3v4l.org

run code in 300+ PHP versions simultaneously
<?php function autoload($className) { $className = ltrim($className, '\\'); $fileName = ''; $namespace = ''; if ($lastNsPos = strrpos($className, '\\')) { $namespace = substr($className, 0, $lastNsPos); $className = substr($className, $lastNsPos + 1); $fileName = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR; } $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php'; require $fileName; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RKuYb
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E > > RETURN                                                   1

Function autoload:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 33
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
filename:       /in/RKuYb
function name:  autoload
number of ops:  42
compiled vars:  !0 = $className, !1 = $fileName, !2 = $namespace, !3 = $lastNsPos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'ltrim'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%5C'
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !0, $4
    6     6        ASSIGN                                                   !1, ''
    7     7        ASSIGN                                                   !2, ''
    8     8        INIT_FCALL                                               'strrpos'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 '%5C'
         11        DO_ICALL                                         $8      
         12        ASSIGN                                           ~9      !3, $8
         13      > JMPZ                                                     ~9, ->33
    9    14    >   INIT_FCALL                                               'substr'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 0
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                         $10     
         19        ASSIGN                                                   !2, $10
   10    20        INIT_FCALL                                               'substr'
         21        SEND_VAR                                                 !0
         22        ADD                                              ~12     !3, 1
         23        SEND_VAL                                                 ~12
         24        DO_ICALL                                         $13     
         25        ASSIGN                                                   !0, $13
   11    26        INIT_FCALL                                               'str_replace'
         27        SEND_VAL                                                 '%5C'
         28        SEND_VAL                                                 '%2F'
         29        SEND_VAR                                                 !2
         30        DO_ICALL                                         $15     
         31        CONCAT                                           ~16     $15, '%2F'
         32        ASSIGN                                                   !1, ~16
   13    33    >   INIT_FCALL                                               'str_replace'
         34        SEND_VAL                                                 '_'
         35        SEND_VAL                                                 '%2F'
         36        SEND_VAR                                                 !0
         37        DO_ICALL                                         $18     
         38        CONCAT                                           ~19     $18, '.php'
         39        ASSIGN_OP                                     8          !1, ~19
   15    40        INCLUDE_OR_EVAL                                          !1, REQUIRE
   16    41      > RETURN                                                   null

End of function autoload

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.63 ms | 1400 KiB | 21 Q