3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f1($class) { echo "f1: [[$class]]\n"; } function f2($class) { echo "f2: [[$class]]\n"; } spl_autoload_register('f1'); spl_autoload_register('f2'); spl_autoload_register(create_function('$class', 'echo "cf1: [[$class]]\n";')); spl_autoload_register(create_function('$class', 'echo "cf2: [[$class]]\n";')); var_dump(spl_autoload_functions()); foreach (spl_autoload_functions() AS $func) { spl_autoload_unregister($func); } var_dump(spl_autoload_functions()); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 28, Position 2 = 33
Branch analysis from position: 28
2 jumps found. (Code = 78) Position 1 = 29, Position 2 = 33
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
filename:       /in/EPVUX
function name:  (null)
number of ops:  40
compiled vars:  !0 = $func
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'spl_autoload_register'
          1        SEND_VAL                                                 'f1'
          2        DO_ICALL                                                 
    7     3        INIT_FCALL                                               'spl_autoload_register'
          4        SEND_VAL                                                 'f2'
          5        DO_ICALL                                                 
    8     6        INIT_FCALL                                               'spl_autoload_register'
          7        INIT_FCALL_BY_NAME                                       'create_function'
          8        SEND_VAL_EX                                              '%24class'
          9        SEND_VAL_EX                                              'echo+%22cf1%3A+%5B%5B%24class%5D%5D%5Cn%22%3B'
         10        DO_FCALL                                      0  $3      
         11        SEND_VAR                                                 $3
         12        DO_ICALL                                                 
    9    13        INIT_FCALL                                               'spl_autoload_register'
         14        INIT_FCALL_BY_NAME                                       'create_function'
         15        SEND_VAL_EX                                              '%24class'
         16        SEND_VAL_EX                                              'echo+%22cf2%3A+%5B%5B%24class%5D%5D%5Cn%22%3B'
         17        DO_FCALL                                      0  $5      
         18        SEND_VAR                                                 $5
         19        DO_ICALL                                                 
   11    20        INIT_FCALL                                               'var_dump'
         21        INIT_FCALL                                               'spl_autoload_functions'
         22        DO_ICALL                                         $7      
         23        SEND_VAR                                                 $7
         24        DO_ICALL                                                 
   12    25        INIT_FCALL                                               'spl_autoload_functions'
         26        DO_ICALL                                         $9      
         27      > FE_RESET_R                                       $10     $9, ->33
         28    > > FE_FETCH_R                                               $10, !0, ->33
   14    29    >   INIT_FCALL                                               'spl_autoload_unregister'
         30        SEND_VAR                                                 !0
         31        DO_ICALL                                                 
   12    32      > JMP                                                      ->28
         33    >   FE_FREE                                                  $10
   16    34        INIT_FCALL                                               'var_dump'
         35        INIT_FCALL                                               'spl_autoload_functions'
         36        DO_ICALL                                         $12     
         37        SEND_VAR                                                 $12
         38        DO_ICALL                                                 
   18    39      > RETURN                                                   1

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

End of function f1

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

End of function f2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.92 ms | 1400 KiB | 21 Q