3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $options['key'][] = 'testkey1'; $options['value'][] = 'testvalue1'; $options['key'][] = 'testkey2'; $options['value'][] = 'testvalue2'; $options['key'][] = 'testkey3'; $options['value'][] = 'testvalue3'; echo "QueryString:\n"; print_r($options); $processed = array(); for ($i = 0; $i < count($options['key']); $i++) { $processed[$i] = array( 'key' => isset($options['key'][$i]) ? $options['key'][$i] : null, 'value' => isset($options['value'][$i]) ? $options['value'][$i] : null, ); } echo "Processed:\n"; print_r($processed); print_r(array_merge_recursive($options['keys'], $options['values']));
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 47
Branch analysis from position: 47
Jump found. Position 1 = 53, Position 2 = 25
Branch analysis from position: 53
Jump found. Position 1 = -2
Branch analysis from position: 25
Jump found. Position 1 = 28, Position 2 = 32
Branch analysis from position: 28
Jump found. Position 1 = 33
Branch analysis from position: 33
Jump found. Position 1 = 37, Position 2 = 41
Branch analysis from position: 37
Jump found. Position 1 = 42
Branch analysis from position: 42
Jump found. Position 1 = 53, Position 2 = 25
Branch analysis from position: 53
Branch analysis from position: 25
Branch analysis from position: 41
Jump found. Position 1 = 53, Position 2 = 25
Branch analysis from position: 53
Branch analysis from position: 25
Branch analysis from position: 32
Jump found. Position 1 = 37, Position 2 = 41
Branch analysis from position: 37
Branch analysis from position: 41
filename:       /in/LmBRg
function name:  (null)
number of ops:  67
compiled vars:  !0 = $options, !1 = $processed, !2 = $i
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   FETCH_DIM_W                                      $3      !0, 'key'
         1        ASSIGN_DIM                                               $3
         2        OP_DATA                                                  'testkey1'
   4     3        FETCH_DIM_W                                      $5      !0, 'value'
         4        ASSIGN_DIM                                               $5
         5        OP_DATA                                                  'testvalue1'
   6     6        FETCH_DIM_W                                      $7      !0, 'key'
         7        ASSIGN_DIM                                               $7
         8        OP_DATA                                                  'testkey2'
   7     9        FETCH_DIM_W                                      $9      !0, 'value'
        10        ASSIGN_DIM                                               $9
        11        OP_DATA                                                  'testvalue2'
   9    12        FETCH_DIM_W                                      $11     !0, 'key'
        13        ASSIGN_DIM                                               $11
        14        OP_DATA                                                  'testkey3'
  10    15        FETCH_DIM_W                                      $13     !0, 'value'
        16        ASSIGN_DIM                                               $13
        17        OP_DATA                                                  'testvalue3'
  12    18        ECHO                                                     'QueryString%3A%0A'
  13    19        INIT_FCALL                                               'print_r'
        20        SEND_VAR                                                 !0
        21        DO_ICALL                                                 
  15    22        ASSIGN                                                   !1, <array>
  16    23        ASSIGN                                                   !2, 0
        24      > JMP                                                      ->47
  18    25    >   FETCH_DIM_IS                                     $19     !0, 'key'
        26        ISSET_ISEMPTY_DIM_OBJ                       33554432  ~20     $19, !2
        27      > JMPZ                                                     ~20, ->32
        28    >   FETCH_DIM_R                                      $21     !0, 'key'
        29        FETCH_DIM_R                                      $22     $21, !2
        30        QM_ASSIGN                                        ~23     $22
        31      > JMP                                                      ->33
        32    >   QM_ASSIGN                                        ~23     null
        33    >   INIT_ARRAY                                       ~24     ~23, 'key'
  19    34        FETCH_DIM_IS                                     $25     !0, 'value'
        35        ISSET_ISEMPTY_DIM_OBJ                       33554432  ~26     $25, !2
        36      > JMPZ                                                     ~26, ->41
        37    >   FETCH_DIM_R                                      $27     !0, 'value'
        38        FETCH_DIM_R                                      $28     $27, !2
        39        QM_ASSIGN                                        ~29     $28
        40      > JMP                                                      ->42
  18    41    >   QM_ASSIGN                                        ~29     null
        42    >   ADD_ARRAY_ELEMENT                                ~24     ~29, 'value'
  17    43        ASSIGN_DIM                                               !1, !2
  18    44        OP_DATA                                                  ~24
  16    45        POST_INC                                         ~30     !2
        46        FREE                                                     ~30
        47    >   INIT_FCALL                                               'count'
        48        FETCH_DIM_R                                      $31     !0, 'key'
        49        SEND_VAR                                                 $31
        50        DO_ICALL                                         $32     
        51        IS_SMALLER                                       ~33     !2, $32
        52      > JMPNZ                                                    ~33, ->25
  23    53    >   ECHO                                                     'Processed%3A%0A'
  24    54        INIT_FCALL                                               'print_r'
        55        SEND_VAR                                                 !1
        56        DO_ICALL                                                 
  27    57        INIT_FCALL                                               'print_r'
        58        INIT_FCALL                                               'array_merge_recursive'
        59        FETCH_DIM_R                                      $35     !0, 'keys'
        60        SEND_VAR                                                 $35
        61        FETCH_DIM_R                                      $36     !0, 'values'
        62        SEND_VAR                                                 $36
        63        DO_ICALL                                         $37     
        64        SEND_VAR                                                 $37
        65        DO_ICALL                                                 
        66      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.2.0