3v4l.org

run code in 300+ PHP versions simultaneously
<?php spl_autoload_register(function($class) { if ('A' == $class) eval(' class a { const a = b::c; const b = b::d; }'); else eval('class b { const c = a::b; const d = 1; }'); }); var_dump(A::a, A::b, B::c, B::d);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/94QSG
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'spl_autoload_register'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F94QSG%3A3%240'
   15     2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   17     4        INIT_FCALL                                               'var_dump'
          5        FETCH_CLASS_CONSTANT                             ~2      'A', 'a'
          6        SEND_VAL                                                 ~2
          7        FETCH_CLASS_CONSTANT                             ~3      'A', 'b'
          8        SEND_VAL                                                 ~3
          9        FETCH_CLASS_CONSTANT                             ~4      'B', 'c'
         10        SEND_VAL                                                 ~4
         11        FETCH_CLASS_CONSTANT                             ~5      'B', 'd'
         12        SEND_VAL                                                 ~5
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F94QSG%3A3%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/94QSG
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        IS_EQUAL                                                 !0, 'A'
          2      > JMPZ                                                     ~1, ->5
    5     3    >   INCLUDE_OR_EVAL                                          '%0Aclass+a+%7B%0A++++const+a+%3D+b%3A%3Ac%3B%0A++++const+b+%3D+b%3A%3Ad%3B%0A%7D', EVAL
          4      > JMP                                                      ->6
   11     5    >   INCLUDE_OR_EVAL                                          'class+b+%7B%0A++++const+c+%3D+a%3A%3Ab%3B%0A++++const+d+%3D+1%3B%0A%7D', EVAL
   15     6    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F94QSG%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.25 ms | 1396 KiB | 17 Q