3v4l.org

run code in 500+ PHP versions simultaneously
<?php $dir = '/administrator' === '/' ? '' : '/administrator' ; var_dump($dir); $parts = explode(DIRECTORY_SEPARATOR, $dir); array_pop($parts); // Defines define('JPATH_ROOT', implode(DIRECTORY_SEPARATOR, $parts)); var_dump(JPATH_ROOT);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 1, Position 2 = 3
Branch analysis from position: 1
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AYRj3
function name:  (null)
number of ops:  26
compiled vars:  !0 = $dir, !1 = $parts
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E > > JMPZ                                                         <false>, ->3
          1    >   QM_ASSIGN                                            ~2      ''
          2      > JMP                                                          ->4
          3    >   QM_ASSIGN                                            ~2      '%2Fadministrator'
          4    >   ASSIGN                                                       !0, ~2
    4     5        INIT_FCALL                                                   'var_dump'
          6        SEND_VAR                                                     !0
          7        DO_ICALL                                                     
    6     8        INIT_FCALL                                                   'explode'
          9        SEND_VAL                                                     '%2F'
         10        SEND_VAR                                                     !0
         11        DO_ICALL                                             $5      
         12        ASSIGN                                                       !1, $5
    7    13        INIT_FCALL                                                   'array_pop'
         14        SEND_REF                                                     !1
         15        DO_ICALL                                                     
   10    16        INIT_FCALL                                                   'define'
         17        SEND_VAL                                                     'JPATH_ROOT'
         18        FRAMELESS_ICALL_2                implode             ~8      '%2F', !1
         19        SEND_VAL                                                     ~8
         20        DO_ICALL                                                     
   12    21        INIT_FCALL                                                   'var_dump'
         22        FETCH_CONSTANT                                       ~10     'JPATH_ROOT'
         23        SEND_VAL                                                     ~10
         24        DO_ICALL                                                     
         25      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.72 ms | 2105 KiB | 19 Q