3v4l.org

run code in 300+ 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                                  '%00%7Bclosure%7D%2Fin%2FpnZHQ%3A2%240'
    9     2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   11     4        INIT_FCALL                                               'register_shutdown_function'
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FpnZHQ%3A11%241'
   13     6        SEND_VAL                                                 ~2
          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

Function %00%7Bclosure%7D%2Fin%2FpnZHQ%3A2%240:
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}
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 function %00%7Bclosure%7D%2Fin%2FpnZHQ%3A2%240

Function %00%7Bclosure%7D%2Fin%2FpnZHQ%3A11%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pnZHQ
function name:  {closure}
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 function %00%7Bclosure%7D%2Fin%2FpnZHQ%3A11%241

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.12 ms | 1401 KiB | 17 Q