3v4l.org

run code in 300+ PHP versions simultaneously
<?php function autoLoadClass($name) { foreach(debug_backtrace() as $call) { if(!array_key_exists('type', $call) && $call['function'] == 'class_exists') { return; } } echo 'spl_autoload_register: ', $name, '<br>'; } spl_autoload_register('autoLoadClass'); class_exists('Foo'); class_exists('Bar'); class_exists('Foo\\Bar');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MYmq7
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'spl_autoload_register'
          1        SEND_VAL                                                 'autoLoadClass'
          2        DO_ICALL                                                 
   13     3        INIT_FCALL                                               'class_exists'
          4        SEND_VAL                                                 'Foo'
          5        DO_ICALL                                                 
   14     6        INIT_FCALL                                               'class_exists'
          7        SEND_VAL                                                 'Bar'
          8        DO_ICALL                                                 
   15     9        INIT_FCALL                                               'class_exists'
         10        SEND_VAL                                                 'Foo%5CBar'
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function autoloadclass:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 15
Branch analysis from position: 5
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 11
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/MYmq7
function name:  autoLoadClass
number of ops:  20
compiled vars:  !0 = $name, !1 = $call
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'debug_backtrace'
          2        DO_ICALL                                         $2      
          3      > FE_RESET_R                                       $3      $2, ->15
          4    > > FE_FETCH_R                                               $3, !1, ->15
    4     5    >   ARRAY_KEY_EXISTS                                 ~4      'type', !1
          6        BOOL_NOT                                         ~5      ~4
          7      > JMPZ_EX                                          ~5      ~5, ->11
          8    >   FETCH_DIM_R                                      ~6      !1, 'function'
          9        IS_EQUAL                                         ~7      ~6, 'class_exists'
         10        BOOL                                             ~5      ~7
         11    > > JMPZ                                                     ~5, ->14
    5    12    >   FE_FREE                                                  $3
         13      > RETURN                                                   null
    3    14    > > JMP                                                      ->4
         15    >   FE_FREE                                                  $3
    8    16        ECHO                                                     'spl_autoload_register%3A+'
         17        ECHO                                                     !0
         18        ECHO                                                     '%3Cbr%3E'
    9    19      > RETURN                                                   null

End of function autoloadclass

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.67 ms | 1413 KiB | 19 Q