3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = '{"name":"type[]","value":"radio"},{"name":"name[]","value":"radio naam 1"},{"name":"label[]","value":"radio label 1"},{"name":"placeholder[]","value":"radio placeholder 1"},{"name":"answer[]","value":"antwoord 1-1"},{"name":"answer[]","value":"antwoord 1-2"}'; $temp = []; foreach (json_decode('[' . $data . ']') as $record) { $temp[] = urlencode($record->name) . '=' . urlencode($record->value); } parse_str(implode('&', $temp), $result); var_dump($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 22
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 22
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/ife6r
function name:  (null)
number of ops:  35
compiled vars:  !0 = $data, !1 = $temp, !2 = $record, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%22name%22%3A%22type%5B%5D%22%2C%22value%22%3A%22radio%22%7D%2C%7B%22name%22%3A%22name%5B%5D%22%2C%22value%22%3A%22radio+naam+1%22%7D%2C%7B%22name%22%3A%22label%5B%5D%22%2C%22value%22%3A%22radio+label+1%22%7D%2C%7B%22name%22%3A%22placeholder%5B%5D%22%2C%22value%22%3A%22radio+placeholder+1%22%7D%2C%7B%22name%22%3A%22answer%5B%5D%22%2C%22value%22%3A%22antwoord+1-1%22%7D%2C%7B%22name%22%3A%22answer%5B%5D%22%2C%22value%22%3A%22antwoord+1-2%22%7D'
    5     1        ASSIGN                                                   !1, <array>
    7     2        INIT_FCALL                                               'json_decode'
          3        CONCAT                                           ~6      '%5B', !0
          4        CONCAT                                           ~7      ~6, '%5D'
          5        SEND_VAL                                                 ~7
          6        DO_ICALL                                         $8      
          7      > FE_RESET_R                                       $9      $8, ->22
          8    > > FE_FETCH_R                                               $9, !2, ->22
    8     9    >   INIT_FCALL                                               'urlencode'
         10        FETCH_OBJ_R                                      ~11     !2, 'name'
         11        SEND_VAL                                                 ~11
         12        DO_ICALL                                         $12     
         13        CONCAT                                           ~13     $12, '%3D'
         14        INIT_FCALL                                               'urlencode'
         15        FETCH_OBJ_R                                      ~14     !2, 'value'
         16        SEND_VAL                                                 ~14
         17        DO_ICALL                                         $15     
         18        CONCAT                                           ~16     ~13, $15
         19        ASSIGN_DIM                                               !1
         20        OP_DATA                                                  ~16
    7    21      > JMP                                                      ->8
         22    >   FE_FREE                                                  $9
   11    23        INIT_FCALL                                               'parse_str'
         24        INIT_FCALL                                               'implode'
         25        SEND_VAL                                                 '%26'
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                         $17     
         28        SEND_VAR                                                 $17
         29        SEND_REF                                                 !3
         30        DO_ICALL                                                 
   13    31        INIT_FCALL                                               'var_dump'
         32        SEND_VAR                                                 !3
         33        DO_ICALL                                                 
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.95 ms | 1396 KiB | 23 Q