3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('UTC'); $dateStart = date_create('2014-07-29'); $dateToday = date_create('2014-07-30'); $startDiff = date_diff( $dateToday , $dateStart); var_dump( $startDiff->days );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CsI6X
function name:  (null)
number of ops:  21
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'
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !0, $4
    6     7        INIT_FCALL                                               'date_create'
          8        SEND_VAL                                                 '2014-07-30'
          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                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.53 ms | 1386 KiB | 21 Q