3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $date1 = new DateTime('2014-08-26 14:35:29'); $date2 = new DateTime(); // The diff-methods returns a new DateInterval-object... $diff = $date2->diff($date1); var_dump($diff); echo"\n\n"; echo $diff->h;
based on 3l31q
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/LeGaB
function name:  (null)
number of ops:  18
compiled vars:  !0 = $date1, !1 = $date2, !2 = $diff
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NEW                                              $3      :-6
         1        SEND_VAL_EX                                              '2014-08-26+14%3A35%3A29'
         2        DO_FCALL                                      0          
         3        ASSIGN                                                   !0, $3
   4     4        NEW                                              $6      :-3
         5        DO_FCALL                                      0          
         6        ASSIGN                                                   !1, $6
   7     7        INIT_METHOD_CALL                                         !1, 'diff'
         8        SEND_VAR_EX                                              !0
         9        DO_FCALL                                      0  $9      
        10        ASSIGN                                                   !2, $9
   9    11        INIT_FCALL                                               'var_dump'
        12        SEND_VAR                                                 !2
        13        DO_ICALL                                                 
  10    14        ECHO                                                     '%0A%0A'
  11    15        FETCH_OBJ_R                                      $12     !2, 'h'
        16        ECHO                                                     $12
        17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0