3v4l.org

run code in 300+ PHP versions simultaneously
<?php $uri = "/user/123/"; $tmp = explode("/", $uri); print_r($tmp); $tmp = explode("/", trim($uri, "/")); print_r($tmp); $tmp = preg_split("~/~", $uri, -1, PREG_SPLIT_NO_EMPTY); print_r($tmp);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3aiXi
function name:  (null)
number of ops:  32
compiled vars:  !0 = $uri, !1 = $tmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2Fuser%2F123%2F'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%2F'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    5     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
    7     9        INIT_FCALL                                               'explode'
         10        SEND_VAL                                                 '%2F'
         11        INIT_FCALL                                               'trim'
         12        SEND_VAR                                                 !0
         13        SEND_VAL                                                 '%2F'
         14        DO_ICALL                                         $6      
         15        SEND_VAR                                                 $6
         16        DO_ICALL                                         $7      
         17        ASSIGN                                                   !1, $7
    8    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
   10    21        INIT_FCALL                                               'preg_split'
         22        SEND_VAL                                                 '%7E%2F%7E'
         23        SEND_VAR                                                 !0
         24        SEND_VAL                                                 -1
         25        SEND_VAL                                                 1
         26        DO_ICALL                                         $10     
         27        ASSIGN                                                   !1, $10
   11    28        INIT_FCALL                                               'print_r'
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.52 ms | 1395 KiB | 21 Q