3v4l.org

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

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

End of function %00%7Bclosure%7D%2Fin%2FekJSP%3A22%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.93 ms | 1396 KiB | 19 Q