3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time1 = '2014-08-26 14:35:29'; $time2 = '2014-08-26 14:45:29'; $strtotime1 = strtotime($time1); $strtotime2 = strtotime($time2); $hourdiff = round((strtotime($strtotime2) - strtotime($strtotime1))/3600, 1); echo $hourdiff; exit; echo $strtotime1; echo "\n"; echo $strtotime2; echo "\n"; echo $strtotime2 - $strtotime1;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/lotH0
function name:  (null)
number of ops:  32
compiled vars:  !0 = $time1, !1 = $time2, !2 = $strtotime1, !3 = $strtotime2, !4 = $hourdiff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '2014-08-26+14%3A35%3A29'
    3     1        ASSIGN                                                   !1, '2014-08-26+14%3A45%3A29'
    5     2        INIT_FCALL                                               'strtotime'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $7      
          5        ASSIGN                                                   !2, $7
    6     6        INIT_FCALL                                               'strtotime'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $9      
          9        ASSIGN                                                   !3, $9
    8    10        INIT_FCALL                                               'round'
         11        INIT_FCALL                                               'strtotime'
         12        SEND_VAR                                                 !3
         13        DO_ICALL                                         $11     
         14        INIT_FCALL                                               'strtotime'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $12     
         17        SUB                                              ~13     $11, $12
         18        DIV                                              ~14     ~13, 3600
         19        SEND_VAL                                                 ~14
         20        SEND_VAL                                                 1
         21        DO_ICALL                                         $15     
         22        ASSIGN                                                   !4, $15
    9    23        ECHO                                                     !4
         24      > EXIT                                                     
   11    25*       ECHO                                                     !2
   12    26*       ECHO                                                     '%0A'
   13    27*       ECHO                                                     !3
   14    28*       ECHO                                                     '%0A'
   15    29*       SUB                                              ~17     !3, !2
         30*       ECHO                                                     ~17
         31*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.17 ms | 1396 KiB | 17 Q