3v4l.org

run code in 300+ 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 = 18
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 18
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/VImVZ
function name:  (null)
number of ops:  20
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, ->18
          2    > > FE_FETCH_R                                               $3, !1, ->18
   10     3    >   INIT_FCALL                                               'implode'
          4        SEND_VAL                                                 '%2F'
          5        INIT_FCALL                                               'array_slice'
          6        INIT_FCALL                                               'explode'
          7        SEND_VAL                                                 '%2F'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $4      
         10        SEND_VAR                                                 $4
         11        SEND_VAL                                                 -4
         12        DO_ICALL                                         $5      
         13        SEND_VAR                                                 $5
         14        DO_ICALL                                         $6      
         15        ECHO                                                     $6
   11    16        ECHO                                                     '%0A'
    9    17      > JMP                                                      ->2
         18    >   FE_FREE                                                  $3
   12    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.8 ms | 1007 KiB | 16 Q