3v4l.org

run code in 300+ PHP versions simultaneously
<?php $path = './a/b/c/d/e.f'; $matches = []; $matches = array_filter(preg_split('/\/|\\\/', $path)); var_dump($matches); echo $matches[count($matches)];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6TUEn
function name:  (null)
number of ops:  17
compiled vars:  !0 = $path, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '.%2Fa%2Fb%2Fc%2Fd%2Fe.f'
    5     1        ASSIGN                                                   !1, <array>
    7     2        INIT_FCALL                                               'array_filter'
          3        INIT_FCALL                                               'preg_split'
          4        SEND_VAL                                                 '%2F%5C%2F%7C%5C%5C%2F'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                         $5      
          9        ASSIGN                                                   !1, $5
    9    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
   11    13        COUNT                                            ~8      !1
         14        FETCH_DIM_R                                      ~9      !1, ~8
         15        ECHO                                                     ~9
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
363.14 ms | 1394 KiB | 19 Q