3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.01 ms | 1394 KiB | 15 Q