3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Autoload { public static function load($class) { return false; } public static function loadFile($path) { include $path; return self::$loadedClasses[$path]; } } // Register the autoloader before any existing autoloaders to ensure // it gets a chance to hear about every autoload request, and record // the file and class name for it. spl_autoload_register(__NAMESPACE__.'\Autoload::load', true, true); //try { class Foo extends Bar {}; /* } catch(Error $e) { var_dump($e); } */
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TZ9Aj
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'spl_autoload_register'
          1        SEND_VAL                                                 '%5CAutoload%3A%3Aload'
          2        SEND_VAL                                                 <true>
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                                 
   24     5        DECLARE_CLASS                                            'foo', 'bar'
   29     6      > RETURN                                                   1

Class Autoload:
Function load:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TZ9Aj
function name:  load
number of ops:  3
compiled vars:  !0 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1      > RETURN                                                   <false>
    8     2*     > RETURN                                                   null

End of function load

Function loadfile:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TZ9Aj
function name:  loadFile
number of ops:  6
compiled vars:  !0 = $path
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        INCLUDE_OR_EVAL                                          !0, INCLUDE
   13     2        FETCH_STATIC_PROP_R          unknown             ~2      'loadedClasses'
          3        FETCH_DIM_R                                      ~3      ~2, !0
          4      > RETURN                                                   ~3
   14     5*     > RETURN                                                   null

End of function loadfile

End of class Autoload.

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
195.21 ms | 1000 KiB | 14 Q