3v4l.org

run code in 500+ PHP versions simultaneously
<?php spl_autoload_register(function($class) { if ($class === 'MyClass') { eval(<<<'PHP' class MyClass {} PHP ); } }); register_shutdown_function(function() { new MyClass; }); eval(<<<'PHP' $x = ['x']; foreach ($x as $i) { $y[]; } PHP );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pnZHQ
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                                   'spl_autoload_register'
          1        DECLARE_LAMBDA_FUNCTION                              ~0      [0]
    9     2        SEND_VAL                                                     ~0
    2     3        DO_ICALL                                                     
   11     4        INIT_FCALL                                                   'register_shutdown_function'
          5        DECLARE_LAMBDA_FUNCTION                              ~2      [1]
   13     6        SEND_VAL                                                     ~2
   11     7        DO_ICALL                                                     
   16     8        INCLUDE_OR_EVAL                                              '%24x+%3D+%5B%27x%27%5D%3B%0Aforeach+%28%24x+as+%24i%29+%7B%0A++++%24y%5B%5D%3B%0A%7D', EVAL
   21     9      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
filename:       /in/pnZHQ
function name:  {closure:/in/pnZHQ:2}
number of ops:  5
compiled vars:  !0 = $class
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   RECV                                                 !0      
    3     1        IS_IDENTICAL                                                 !0, 'MyClass'
          2      > JMPZ                                                         ~1, ->4
    5     3    >   INCLUDE_OR_EVAL                                              'class+MyClass+%7B%7D', EVAL
    9     4    > > RETURN                                                       null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pnZHQ
function name:  {closure:/in/pnZHQ:11}
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   NEW                                                  $0      'MyClass'
          1        DO_FCALL                                          0          
          2        FREE                                                         $0
   13     3      > RETURN                                                       null

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
128.02 ms | 480 KiB | 9 Q