3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pieces = preg_split('#[\\\\/]#', '/foo/test/basdasd', -1, PREG_SPLIT_NO_EMPTY); $root_container = $pieces[0]; array_unshift($pieces); print_r(implode("/",$pieces));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WUcff
function name:  (null)
number of ops:  20
compiled vars:  !0 = $pieces, !1 = $root_container
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'preg_split'
          1        SEND_VAL                                                 '%23%5B%5C%5C%2F%5D%23'
          2        SEND_VAL                                                 '%2Ffoo%2Ftest%2Fbasdasd'
          3        SEND_VAL                                                 -1
          4        SEND_VAL                                                 1
          5        DO_ICALL                                         $2      
          6        ASSIGN                                                   !0, $2
    3     7        FETCH_DIM_R                                      ~4      !0, 0
          8        ASSIGN                                                   !1, ~4
    4     9        INIT_FCALL                                               'array_unshift'
         10        SEND_REF                                                 !0
         11        DO_ICALL                                                 
    5    12        INIT_FCALL                                               'print_r'
         13        INIT_FCALL                                               'implode'
         14        SEND_VAL                                                 '%2F'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $7      
         17        SEND_VAR                                                 $7
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.75 ms | 1395 KiB | 21 Q