3v4l.org

run code in 300+ PHP versions simultaneously
<?php $parameters = "userOnline=now, userName=- week"; $parametersString = explode(', ', $parameters); $parametersArray = array(); array_walk($parametersString, 'walk'); function walk($val, $key){ $nums = explode('=', $val); $parametersArray[$nums[0]] = $nums[1]; } print_r($parametersString); print_r($parametersArray);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D4APu
function name:  (null)
number of ops:  18
compiled vars:  !0 = $parameters, !1 = $parametersString, !2 = $parametersArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'userOnline%3Dnow%2C+userName%3D-+week'
    3     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%2C+'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    4     6        ASSIGN                                                   !2, <array>
    5     7        INIT_FCALL                                               'array_walk'
          8        SEND_REF                                                 !1
          9        SEND_VAL                                                 'walk'
         10        DO_ICALL                                                 
   12    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                                 
   13    14        INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Function walk:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/D4APu
function name:  walk
number of ops:  12
compiled vars:  !0 = $val, !1 = $key, !2 = $nums, !3 = $parametersArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%3D'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !2, $4
    9     7        FETCH_DIM_R                                      ~6      !2, 0
          8        FETCH_DIM_R                                      ~8      !2, 1
          9        ASSIGN_DIM                                               !3, ~6
         10        OP_DATA                                                  ~8
   10    11      > RETURN                                                   null

End of function walk

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.06 ms | 1396 KiB | 19 Q