3v4l.org

run code in 300+ PHP versions simultaneously
<?php file_put_contents('/tmp/A.php', <<<EOF <?php class a { const a = b::c; const b = b::d; } EOF); file_put_contents('/tmp/B.php', <<<EOF <?php class b { const c = a::b; const d = 1; } EOF); spl_autoload_register(function($class) { require('/tmp/'. $class .'.php'); }); 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/d1ORL
function name:  (null)
number of ops:  23
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'file_put_contents'
          1        SEND_VAL                                                 '%2Ftmp%2FA.php'
    4     2        SEND_VAL                                                 '%3C%3Fphp%0A%0Aclass+a+%7B%0A++++const+a+%3D+b%3A%3Ac%3B%0A++++const+b+%3D+b%3A%3Ad%3B%0A%7D'
          3        DO_ICALL                                                 
   12     4        INIT_FCALL                                               'file_put_contents'
          5        SEND_VAL                                                 '%2Ftmp%2FB.php'
   13     6        SEND_VAL                                                 '%3C%3Fphp%0Aclass+b+%7B%0A++++const+c+%3D+a%3A%3Ab%3B%0A++++const+d+%3D+1%3B%0A%7D'
          7        DO_ICALL                                                 
   20     8        INIT_FCALL                                               'spl_autoload_register'
          9        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fd1ORL%3A20%240'
   22    10        SEND_VAL                                                 ~2
         11        DO_ICALL                                                 
   24    12        INIT_FCALL                                               'var_dump'
         13        FETCH_CLASS_CONSTANT                             ~4      'A', 'a'
         14        SEND_VAL                                                 ~4
         15        FETCH_CLASS_CONSTANT                             ~5      'A', 'b'
         16        SEND_VAL                                                 ~5
         17        FETCH_CLASS_CONSTANT                             ~6      'B', 'c'
         18        SEND_VAL                                                 ~6
         19        FETCH_CLASS_CONSTANT                             ~7      'B', 'd'
         20        SEND_VAL                                                 ~7
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fd1ORL%3A20%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/d1ORL
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   21     1        CONCAT                                           ~1      '%2Ftmp%2F', !0
          2        CONCAT                                           ~2      ~1, '.php'
          3        INCLUDE_OR_EVAL                                          ~2, REQUIRE
   22     4      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fd1ORL%3A20%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.94 ms | 1396 KiB | 19 Q