3v4l.org

run code in 300+ PHP versions simultaneously
<?php $originalParams = [ 'foo' => 'bar', 'faz' => [1,2,3], 'targeting' => [ 'countries' => 'US,GB', 'age_min' => 13, ], 'call_to_action' => [ 'type' => 'LEARN_MORE', 'value' => [ 'link' => 'http://example.com', 'sponsorship' => [ 'image' => 'http://example.com/bar.jpg', ], ], ], ]; $params = explode('&', http_build_query($originalParams, null, '&')); $result = []; foreach ($params as $param) { list($key, $value) = explode('=', $param, 2); $result[urldecode($key)] = urldecode($value); } var_dump($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 33
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 33
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
filename:       /in/CHTBd
function name:  (null)
number of ops:  38
compiled vars:  !0 = $originalParams, !1 = $params, !2 = $result, !3 = $param, !4 = $key, !5 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   21     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%26'
          3        INIT_FCALL                                               'http_build_query'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 null
          6        SEND_VAL                                                 '%26'
          7        DO_ICALL                                         $7      
          8        SEND_VAR                                                 $7
          9        DO_ICALL                                         $8      
         10        ASSIGN                                                   !1, $8
   22    11        ASSIGN                                                   !2, <array>
   23    12      > FE_RESET_R                                       $11     !1, ->33
         13    > > FE_FETCH_R                                               $11, !3, ->33
   24    14    >   INIT_FCALL                                               'explode'
         15        SEND_VAL                                                 '%3D'
         16        SEND_VAR                                                 !3
         17        SEND_VAL                                                 2
         18        DO_ICALL                                         $12     
         19        FETCH_LIST_R                                     $13     $12, 0
         20        ASSIGN                                                   !4, $13
         21        FETCH_LIST_R                                     $15     $12, 1
         22        ASSIGN                                                   !5, $15
         23        FREE                                                     $12
   25    24        INIT_FCALL                                               'urldecode'
         25        SEND_VAR                                                 !4
         26        DO_ICALL                                         $17     
         27        INIT_FCALL                                               'urldecode'
         28        SEND_VAR                                                 !5
         29        DO_ICALL                                         $19     
         30        ASSIGN_DIM                                               !2, $17
         31        OP_DATA                                                  $19
   23    32      > JMP                                                      ->13
         33    >   FE_FREE                                                  $11
   28    34        INIT_FCALL                                               'var_dump'
         35        SEND_VAR                                                 !2
         36        DO_ICALL                                                 
         37      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.55 ms | 1388 KiB | 21 Q