3v4l.org

run code in 300+ PHP versions simultaneously
<?php spl_autoload_register(function($class){ if ($class === 'A') { eval("class A { }"); } }); class B extends A { } print_r(array_reverse(get_declared_classes()));

Abusive script

This script was stopped while abusing our resources

Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lEnsR
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'spl_autoload_register'
          1        DECLARE_LAMBDA_FUNCTION                          ~0      [0]
    7     2        SEND_VAL                                                 ~0
    3     3        DO_ICALL                                                 
    9     4        DECLARE_CLASS                                            'b', 'a'
   13     5        INIT_FCALL                                               'print_r'
          6        INIT_FCALL                                               'array_reverse'
          7        INIT_FCALL                                               'get_declared_classes'
          8        DO_ICALL                                         $2      
          9        SEND_VAR                                                 $2
         10        DO_ICALL                                         $3      
         11        SEND_VAR                                                 $3
         12        DO_ICALL                                                 
         13      > 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/lEnsR
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        IS_IDENTICAL                                             !0, 'A'
          2      > JMPZ                                                     ~1, ->4
    5     3    >   INCLUDE_OR_EVAL                                          'class+A+%7B+%7D', EVAL
    7     4    > > RETURN                                                   null

End of Dynamic Function 0

Class B: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.9 ms | 1000 KiB | 17 Q