3v4l.org

run code in 500+ PHP versions simultaneously
<?php $strings = [ 'this/is/the/path/to/my/fileA.php', 'this/could/also/be/the/path/to/my/fileB.php', 'another/example/of/a/long/address/which/is/a/path/to/my/fileC.php', ]; foreach ($strings as $string) { echo implode('/', array_slice(explode('/', $string), -4)); echo "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 15
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 15
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/VImVZ
function name:  (null)
number of ops:  17
compiled vars:  !0 = $strings, !1 = $string
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    9     1      > FE_RESET_R                                           $3      !0, ->15
          2    > > FE_FETCH_R                                                   $3, !1, ->15
   10     3    >   INIT_FCALL                                                   'array_slice'
          4        INIT_FCALL                                                   'explode'
          5        SEND_VAL                                                     '%2F'
          6        SEND_VAR                                                     !1
          7        DO_ICALL                                             $4      
          8        SEND_VAR                                                     $4
          9        SEND_VAL                                                     -4
         10        DO_ICALL                                             $5      
         11        FRAMELESS_ICALL_2                implode             ~6      '%2F', $5
         12        ECHO                                                         ~6
   11    13        ECHO                                                         '%0A'
    9    14      > JMP                                                          ->2
         15    >   FE_FREE                                                      $3
   12    16      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
190.9 ms | 1769 KiB | 15 Q