3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = new DateTime(); $bar = new DateTime('2014-09-21 00:00:00'); $baz = $bar - $foo; var_dump($baz->format('Y'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eAYmr
function name:  (null)
number of ops:  16
compiled vars:  !0 = $foo, !1 = $bar, !2 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $3      'DateTime'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    3     3        NEW                                              $6      'DateTime'
          4        SEND_VAL_EX                                              '2014-09-21+00%3A00%3A00'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $6
    4     7        SUB                                              ~9      !1, !0
          8        ASSIGN                                                   !2, ~9
    5     9        INIT_FCALL                                               'var_dump'
         10        INIT_METHOD_CALL                                         !2, 'format'
         11        SEND_VAL_EX                                              'Y'
         12        DO_FCALL                                      0  $11     
         13        SEND_VAR                                                 $11
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.3 ms | 1394 KiB | 15 Q