3v4l.org

run code in 500+ PHP versions simultaneously
<?php first::init(); second::init(); print_r(spl_autoload_functions()); new Foo; class first { public static function init() { spl_autoload_register(array('self','load')); } public static function load($class) { echo "first is loading class $class\n"; } } class second { public static function init() { spl_autoload_register(array('self','load')); } public static function load($class){ echo "second is loading class $class\n"; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aMkoi
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_STATIC_METHOD_CALL                                      'first', 'init'
          1        DO_FCALL                                          0          
    4     2        INIT_STATIC_METHOD_CALL                                      'second', 'init'
          3        DO_FCALL                                          0          
    5     4        INIT_FCALL                                                   'print_r'
          5        INIT_FCALL                                                   'spl_autoload_functions'
          6        DO_ICALL                                             $2      
          7        SEND_VAR                                                     $2
          8        DO_ICALL                                                     
    6     9        NEW                                                  $4      'Foo'
         10        DO_FCALL                                          0          
         11        FREE                                                         $4
   25    12      > RETURN                                                       1

Class first:
Function init:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aMkoi
function name:  init
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                                   'spl_autoload_register'
          1        SEND_VAL                                                     <array>
          2        DO_ICALL                                                     
   11     3      > RETURN                                                       null

End of function init

Function load:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aMkoi
function name:  load
number of ops:  6
compiled vars:  !0 = $class
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   RECV                                                 !0      
   13     1        ROPE_INIT                                         3  ~2      'first+is+loading+class+'
          2        ROPE_ADD                                          1  ~2      ~2, !0
          3        ROPE_END                                          2  ~1      ~2, '%0A'
          4        ECHO                                                         ~1
   14     5      > RETURN                                                       null

End of function load

End of class first.

Class second:
Function init:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aMkoi
function name:  init
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                                   'spl_autoload_register'
          1        SEND_VAL                                                     <array>
          2        DO_ICALL                                                     
   21     3      > RETURN                                                       null

End of function init

Function load:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aMkoi
function name:  load
number of ops:  6
compiled vars:  !0 = $class
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   22     0  E >   RECV                                                 !0      
   23     1        ROPE_INIT                                         3  ~2      'second+is+loading+class+'
          2        ROPE_ADD                                          1  ~2      ~2, !0
          3        ROPE_END                                          2  ~1      ~2, '%0A'
          4        ECHO                                                         ~1
   24     5      > RETURN                                                       null

End of function load

End of class second.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.77 ms | 2840 KiB | 16 Q