3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (defined('PHP_VERSION_ID') && version_compare(PHP_VERSION_ID, '5.3') >= 0){ // use autoloader in higher versions function PilipaySplAutoloader($class){ $pilipay = 'Pilipay'; $class = ltrim($class, '\\'); if (strncmp($class, $pilipay, strlen($pilipay)) === 0){ $file = __DIR__ . DIRECTORY_SEPARATOR . $class . '.php'; if (file_exists($file)){ include($file); } } } spl_autoload_register('PilipaySplAutoloader'); } else { echo "old version!"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7aLBP
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'version_compare'
          1        SEND_VAL                                                 80000
          2        SEND_VAL                                                 '5.3'
          3        DO_ICALL                                         $0      
          4        IS_SMALLER_OR_EQUAL                              ~1      0, $0
          5        BOOL                                             ~2      ~1
          6      > JMPZ                                                     ~2, ->12
    5     7    >   DECLARE_FUNCTION                                         'pilipaysplautoloader'
   15     8        INIT_FCALL                                               'spl_autoload_register'
          9        SEND_VAL                                                 'PilipaySplAutoloader'
         10        DO_ICALL                                                 
         11      > JMP                                                      ->13
   18    12    >   ECHO                                                     'old+version%21'
   19    13    > > RETURN                                                   1

Function %00pilipaysplautoloader%2Fin%2F7aLBP%3A5%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 23
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 23
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
Branch analysis from position: 23
filename:       /in/7aLBP
function name:  PilipaySplAutoloader
number of ops:  24
compiled vars:  !0 = $class, !1 = $pilipay, !2 = $file
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        ASSIGN                                                   !1, 'Pilipay'
    7     2        INIT_FCALL                                               'ltrim'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 '%5C'
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !0, $4
    8     7        INIT_FCALL                                               'strncmp'
          8        SEND_VAR                                                 !0
          9        SEND_VAR                                                 !1
         10        STRLEN                                           ~6      !1
         11        SEND_VAL                                                 ~6
         12        DO_ICALL                                         $7      
         13        IS_IDENTICAL                                             $7, 0
         14      > JMPZ                                                     ~8, ->23
    9    15    >   CONCAT                                           ~9      '%2Fin%2F', !0
         16        CONCAT                                           ~10     ~9, '.php'
         17        ASSIGN                                                   !2, ~10
   10    18        INIT_FCALL                                               'file_exists'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                         $12     
         21      > JMPZ                                                     $12, ->23
   11    22    >   INCLUDE_OR_EVAL                                          !2, INCLUDE
   14    23    > > RETURN                                                   null

End of function %00pilipaysplautoloader%2Fin%2F7aLBP%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.25 ms | 1400 KiB | 23 Q