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, '&'); var_dump($query); $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 = 17, Position 2 = 37
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 37
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 37
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
filename:       /in/A9637
function name:  (null)
number of ops:  42
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                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
   23    10        INIT_FCALL                                               'explode'
         11        SEND_VAL                                                 '%26'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $11     
         14        ASSIGN                                                   !2, $11
   25    15        ASSIGN                                                   !3, <array>
   26    16      > FE_RESET_R                                       $14     !2, ->37
         17    > > FE_FETCH_R                                               $14, !4, ->37
   27    18    >   INIT_FCALL                                               'explode'
         19        SEND_VAL                                                 '%3D'
         20        SEND_VAR                                                 !4
         21        SEND_VAL                                                 2
         22        DO_ICALL                                         $15     
         23        FETCH_LIST_R                                     $16     $15, 0
         24        ASSIGN                                                   !5, $16
         25        FETCH_LIST_R                                     $18     $15, 1
         26        ASSIGN                                                   !6, $18
         27        FREE                                                     $15
   28    28        INIT_FCALL                                               'urldecode'
         29        SEND_VAR                                                 !5
         30        DO_ICALL                                         $20     
         31        INIT_FCALL                                               'urldecode'
         32        SEND_VAR                                                 !6
         33        DO_ICALL                                         $22     
         34        ASSIGN_DIM                                               !3, $20
         35        OP_DATA                                                  $22
   26    36      > JMP                                                      ->17
         37    >   FE_FREE                                                  $14
   31    38        INIT_FCALL                                               'var_dump'
         39        SEND_VAR                                                 !3
         40        DO_ICALL                                                 
         41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.87 ms | 1400 KiB | 21 Q