3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = "/user12345 lorem ipsum dolor"; $z = explode(' ', $x, 2); $z[0] = substr($z[0], 5); print_r($z); preg_match('#^/user(\d+)\s+(.*)$#', $x, $z); array_shift($z); print_r($z);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kshdN
function name:  (null)
number of ops:  29
compiled vars:  !0 = $x, !1 = $z
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2Fuser12345+lorem+ipsum+dolor'
    5     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 2
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
    6     7        INIT_FCALL                                               'substr'
          8        FETCH_DIM_R                                      ~6      !1, 0
          9        SEND_VAL                                                 ~6
         10        SEND_VAL                                                 5
         11        DO_ICALL                                         $7      
         12        ASSIGN_DIM                                               !1, 0
         13        OP_DATA                                                  $7
    7    14        INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
    9    17        INIT_FCALL                                               'preg_match'
         18        SEND_VAL                                                 '%23%5E%2Fuser%28%5Cd%2B%29%5Cs%2B%28.%2A%29%24%23'
         19        SEND_VAR                                                 !0
         20        SEND_REF                                                 !1
         21        DO_ICALL                                                 
   10    22        INIT_FCALL                                               'array_shift'
         23        SEND_REF                                                 !1
         24        DO_ICALL                                                 
   11    25        INIT_FCALL                                               'print_r'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.54 ms | 1399 KiB | 23 Q