3v4l.org

run code in 300+ 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:  29
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        INIT_FCALL                                               'implode'
         19        SEND_VAL                                                 '%2F'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                         $8      
         22        SEND_VAR                                                 $8
         23        DO_ICALL                                                 
   12    24        INIT_FCALL                                               'var_dump'
         25        FETCH_CONSTANT                                   ~10     'JPATH_ROOT'
         26        SEND_VAL                                                 ~10
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.28 ms | 1002 KiB | 18 Q