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', ], ], ], ]; $query = http_build_query($originalParams, null, '&'); $params = explode('&', $query); $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 = 14, Position 2 = 34
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 34
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
filename:       /in/s3t3Y
function name:  (null)
number of ops:  39
compiled vars:  !0 = $originalParams, !1 = $query, !2 = $params, !3 = $result, !4 = $param, !5 = $key, !6 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   21     1        INIT_FCALL                                               'http_build_query'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 null
          4        SEND_VAL                                                 '%26'
          5        DO_ICALL                                         $8      
          6        ASSIGN                                                   !1, $8
   22     7        INIT_FCALL                                               'explode'
          8        SEND_VAL                                                 '%26'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $10     
         11        ASSIGN                                                   !2, $10
   24    12        ASSIGN                                                   !3, <array>
   25    13      > FE_RESET_R                                       $13     !2, ->34
         14    > > FE_FETCH_R                                               $13, !4, ->34
   26    15    >   INIT_FCALL                                               'explode'
         16        SEND_VAL                                                 '%3D'
         17        SEND_VAR                                                 !4
         18        SEND_VAL                                                 2
         19        DO_ICALL                                         $14     
         20        FETCH_LIST_R                                     $15     $14, 0
         21        ASSIGN                                                   !5, $15
         22        FETCH_LIST_R                                     $17     $14, 1
         23        ASSIGN                                                   !6, $17
         24        FREE                                                     $14
   27    25        INIT_FCALL                                               'urldecode'
         26        SEND_VAR                                                 !5
         27        DO_ICALL                                         $19     
         28        INIT_FCALL                                               'urldecode'
         29        SEND_VAR                                                 !6
         30        DO_ICALL                                         $21     
         31        ASSIGN_DIM                                               !3, $19
         32        OP_DATA                                                  $21
   25    33      > JMP                                                      ->14
         34    >   FE_FREE                                                  $13
   30    35        INIT_FCALL                                               'var_dump'
         36        SEND_VAR                                                 !3
         37        DO_ICALL                                                 
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.12 ms | 1396 KiB | 21 Q