3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str ='1stparm?#?1111?@?2ndParm?#?2222?@?3rdParm?#?3333?@?4thparm?#?444?@?'; $keyval = explode('?@?', trim($str, '?@')); $result = []; foreach($keyval as $item) { [$key, $result[$key]] = explode('?#?', $item); } print_r($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 24
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 24
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/gMVer
function name:  (null)
number of ops:  29
compiled vars:  !0 = $str, !1 = $keyval, !2 = $result, !3 = $item, !4 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '1stparm%3F%23%3F1111%3F%40%3F2ndParm%3F%23%3F2222%3F%40%3F3rdParm%3F%23%3F3333%3F%40%3F4thparm%3F%23%3F444%3F%40%3F'
    5     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%3F%40%3F'
          3        INIT_FCALL                                               'trim'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 '%3F%40'
          6        DO_ICALL                                         $6      
          7        SEND_VAR                                                 $6
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !1, $7
    7    10        ASSIGN                                                   !2, <array>
    9    11      > FE_RESET_R                                       $10     !1, ->24
         12    > > FE_FETCH_R                                               $10, !3, ->24
   10    13    >   INIT_FCALL                                               'explode'
         14        SEND_VAL                                                 '%3F%23%3F'
         15        SEND_VAR                                                 !3
         16        DO_ICALL                                         $11     
         17        FETCH_LIST_R                                     $12     $11, 0
         18        ASSIGN                                                   !4, $12
         19        FETCH_LIST_R                                     $14     $11, 1
         20        ASSIGN_DIM                                               !2, !4
         21        OP_DATA                                                  $14
         22        FREE                                                     $11
    9    23      > JMP                                                      ->12
         24    >   FE_FREE                                                  $10
   13    25        INIT_FCALL                                               'print_r'
         26        SEND_VAR                                                 !2
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.75 ms | 1401 KiB | 19 Q