3v4l.org

run code in 300+ PHP versions simultaneously
<?php parse_str("ref_1=000CBA0000&name_1=Produto%20A&quantity_1=1&ref_2=000CBA0000&name_2=Produto%20A&quantity_2=1&ref_3=000CBA0000&name_3=Produto%20A&quantity_3=1", $arr); foreach($arr as $key => $val){ $temp = explode("_", $key); $new[$temp[1]][$temp[0]] = $val; } var_dump($new);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 18
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 18
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/WVGiv
function name:  (null)
number of ops:  23
compiled vars:  !0 = $arr, !1 = $val, !2 = $key, !3 = $temp, !4 = $new
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'parse_str'
          1        SEND_VAL                                                 'ref_1%3D000CBA0000%26name_1%3DProduto%2520A%26quantity_1%3D1%26ref_2%3D000CBA0000%26name_2%3DProduto%2520A%26quantity_2%3D1%26ref_3%3D000CBA0000%26name_3%3DProduto%2520A%26quantity_3%3D1'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
    6     4      > FE_RESET_R                                       $6      !0, ->18
          5    > > FE_FETCH_R                                       ~7      $6, !1, ->18
          6    >   ASSIGN                                                   !2, ~7
    7     7        INIT_FCALL                                               'explode'
          8        SEND_VAL                                                 '_'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                         $9      
         11        ASSIGN                                                   !3, $9
    8    12        FETCH_DIM_R                                      ~11     !3, 1
         13        FETCH_DIM_R                                      ~13     !3, 0
         14        FETCH_DIM_W                                      $12     !4, ~11
         15        ASSIGN_DIM                                               $12, ~13
         16        OP_DATA                                                  !1
    6    17      > JMP                                                      ->5
         18    >   FE_FREE                                                  $6
   10    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !4
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.62 ms | 1012 KiB | 16 Q