3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('UTC'); $dateStart = date_create('2014-07-29 13:00'); $dateToday = date_create('2014-07-30 15:00'); $startDiff = date_diff( $dateToday , $dateStart); var_dump( $startDiff->days ); var_dump( $startDiff->h );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1FcGn
function name:  (null)
number of ops:  25
compiled vars:  !0 = $dateStart, !1 = $dateToday, !2 = $startDiff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'date_default_timezone_set'
          1        SEND_VAL                                                 'UTC'
          2        DO_ICALL                                                 
    5     3        INIT_FCALL                                               'date_create'
          4        SEND_VAL                                                 '2014-07-29+13%3A00'
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !0, $4
    6     7        INIT_FCALL                                               'date_create'
          8        SEND_VAL                                                 '2014-07-30+15%3A00'
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !1, $6
    7    11        INIT_FCALL                                               'date_diff'
         12        SEND_VAR                                                 !1
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $8      
         15        ASSIGN                                                   !2, $8
    9    16        INIT_FCALL                                               'var_dump'
         17        FETCH_OBJ_R                                      ~10     !2, 'days'
         18        SEND_VAL                                                 ~10
         19        DO_ICALL                                                 
   10    20        INIT_FCALL                                               'var_dump'
         21        FETCH_OBJ_R                                      ~12     !2, 'h'
         22        SEND_VAL                                                 ~12
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.92 ms | 1399 KiB | 21 Q