3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time1 = '2014-08-26 14:35:29'; $time2 = '2014-08-26 15:35:29'; $time1 = strtotime('2014-08-27 14:35:29'); $time2 = time(); //$strtotime1 = strtotime($time1); //$strtotime2 = strtotime($time2); //var_dump($strtotime1 );"\n"; //var_dump($time2);exit; //$hourdiff = round((strtotime($strtotime2) - strtotime($strtotime1))/3600, 1); //echo $hourdiff; exit; //echo $strtotime1; //var_dump(new DateTime()); //echo $strtotime2; echo "\n"; echo round(($time2 - $time1)/3600);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H3Ls9
function name:  (null)
number of ops:  17
compiled vars:  !0 = $time1, !1 = $time2
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+15%3A35%3A29'
    5     2        INIT_FCALL                                               'strtotime'
          3        SEND_VAL                                                 '2014-08-27+14%3A35%3A29'
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !0, $4
    6     6        INIT_FCALL                                               'time'
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !1, $6
   22     9        ECHO                                                     '%0A'
   23    10        INIT_FCALL                                               'round'
         11        SUB                                              ~8      !1, !0
         12        DIV                                              ~9      ~8, 3600
         13        SEND_VAL                                                 ~9
         14        DO_ICALL                                         $10     
         15        ECHO                                                     $10
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.54 ms | 1394 KiB | 19 Q