3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo; class Loader { public function __construct() { spl_autoload_register([$this, 'load']); } public static function load() {} } spl_autoload_register(['Loader', 'load']); new Loader(); var_dump(spl_autoload_functions());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0P7m3
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_NS_FCALL_BY_NAME                                    'Foo%5Cspl_autoload_register'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
   10     3        NEW                                              $1      'Foo%5CLoader'
          4        DO_FCALL                                      0          
          5        FREE                                                     $1
   12     6        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cvar_dump'
          7        INIT_NS_FCALL_BY_NAME                                    'Foo%5Cspl_autoload_functions'
          8        DO_FCALL                                      0  $3      
          9        SEND_VAR_NO_REF_EX                                       $3
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Class Foo\Loader:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0P7m3
function name:  __construct
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_NS_FCALL_BY_NAME                                    'Foo%5Cspl_autoload_register'
          1        FETCH_THIS                                       ~0      
          2        INIT_ARRAY                                       ~1      ~0
          3        ADD_ARRAY_ELEMENT                                ~1      'load'
          4        SEND_VAL_EX                                              ~1
          5        DO_FCALL                                      0          
    6     6      > RETURN                                                   null

End of function __construct

Function load:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0P7m3
function name:  load
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   null

End of function load

End of class Foo\Loader.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.61 ms | 1395 KiB | 19 Q