3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Autoloader1 { public static function autoload ($class) { var_dump("Loading {$class} from " . __CLASS__); spl_autoload_register(["Autoloader2", "autoload"]); } } class Autoloader2 { public static function autoload ($class) { var_dump("Loading {$class} from " . __CLASS__);exit; } } spl_autoload_register(["Autoloader1", "autoload"]); $r = new Foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7gp1b
function name:  (null)
number of ops:  7
compiled vars:  !0 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                               'spl_autoload_register'
          1        SEND_VAL                                                 <array>
          2        DO_ICALL                                                 
   21     3        NEW                                              $2      'Foo'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
          6      > RETURN                                                   1

Class Autoloader1:
Function autoload:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7gp1b
function name:  autoload
number of ops:  12
compiled vars:  !0 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'var_dump'
          2        ROPE_INIT                                     3  ~2      'Loading+'
          3        ROPE_ADD                                      1  ~2      ~2, !0
          4        ROPE_END                                      2  ~1      ~2, '+from+'
          5        CONCAT                                           ~4      ~1, 'Autoloader1'
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
    8     8        INIT_FCALL                                               'spl_autoload_register'
          9        SEND_VAL                                                 <array>
         10        DO_ICALL                                                 
    9    11      > RETURN                                                   null

End of function autoload

End of class Autoloader1.

Class Autoloader2:
Function autoload:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/7gp1b
function name:  autoload
number of ops:  10
compiled vars:  !0 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   15     1        INIT_FCALL                                               'var_dump'
          2        ROPE_INIT                                     3  ~2      'Loading+'
          3        ROPE_ADD                                      1  ~2      ~2, !0
          4        ROPE_END                                      2  ~1      ~2, '+from+'
          5        CONCAT                                           ~4      ~1, 'Autoloader2'
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
          8      > EXIT                                                     
   16     9*     > RETURN                                                   null

End of function autoload

End of class Autoloader2.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.06 ms | 1396 KiB | 17 Q