3v4l.org

run code in 300+ PHP versions simultaneously
<?php $start = strtotime('2017-09-01 23:00:00'); $stop = strtotime('2017-09-02 01:34:00'); $hours = ($stop - $start) / 3600; echo round($hours, 2); // 2.57
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3p1V3
function name:  (null)
number of ops:  17
compiled vars:  !0 = $start, !1 = $stop, !2 = $hours
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'strtotime'
          1        SEND_VAL                                                 '2017-09-01+23%3A00%3A00'
          2        DO_ICALL                                         $3      
          3        ASSIGN                                                   !0, $3
    4     4        INIT_FCALL                                               'strtotime'
          5        SEND_VAL                                                 '2017-09-02+01%3A34%3A00'
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
    5     8        SUB                                              ~7      !1, !0
          9        DIV                                              ~8      ~7, 3600
         10        ASSIGN                                                   !2, ~8
    7    11        INIT_FCALL                                               'round'
         12        SEND_VAR                                                 !2
         13        SEND_VAL                                                 2
         14        DO_ICALL                                         $10     
         15        ECHO                                                     $10
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.39 ms | 1010 KiB | 15 Q