3v4l.org

run code in 200+ PHP versions simultaneously
<?php echo PHP_VERSION; date_default_timezone_set('UTC'); $dti = new DateTimeImmutable('2012-01-01 00:00:00'); $dt = new DateTime('2012-01-01 00:01:00'); var_dump($dt->diff($dti), date_diff($dt, $dti));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SrklS
function name:  (null)
number of ops:  24
compiled vars:  !0 = $dti, !1 = $dt
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   ASSIGN_OBJ                                               '7.4.0'
   5     1        INIT_FCALL                                               'date_default_timezone_set'
         2        SEND_VAL                                                 'UTC'
         3        DO_ICALL                                                 
   6     4        NEW                                              $3      :38
         5        SEND_VAL_EX                                              '2012-01-01+00%3A00%3A00'
         6        DO_FCALL                                      0          
         7        QM_ASSIGN                                                !0
   7     8        NEW                                              $6      :33
         9        SEND_VAL_EX                                              '2012-01-01+00%3A01%3A00'
        10        DO_FCALL                                      0          
        11        QM_ASSIGN                                                !1
   9    12        INIT_FCALL                                               'var_dump'
        13        INIT_METHOD_CALL                                         !1, 'diff'
        14        SEND_VAR_EX                                              !0
        15        DO_FCALL                                      0  $9      
        16        SEND_VAR                                                 $9
        17        INIT_FCALL                                               'date_diff'
        18        SEND_VAR                                                 !1
        19        SEND_VAR                                                 !0
        20        DO_ICALL                                         $10     
        21        SEND_VAR                                                 $10
        22        DO_ICALL                                                 
        23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.4.0