3v4l.org

run code in 300+ PHP versions simultaneously
<?php $options['key'][] = 'testkey1'; $options['value'][] = 'testvalue1'; $options['key'][] = 'testkey2'; $options['value'][] = 'testvalue2'; $options['key'][] = 'testkey3'; $options['value'][] = 'testvalue3'; 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, ); } print_r($processed);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 45
Branch analysis from position: 45
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 24
Branch analysis from position: 49
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 31
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 40
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 24
Branch analysis from position: 49
Branch analysis from position: 24
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 49, Position 2 = 24
Branch analysis from position: 49
Branch analysis from position: 24
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 40
Branch analysis from position: 36
Branch analysis from position: 40
filename:       /in/YBbl7
function name:  (null)
number of ops:  53
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        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
   14    21        ASSIGN                                                   !1, <array>
   15    22        ASSIGN                                                   !2, 0
         23      > JMP                                                      ->45
   17    24    >   FETCH_DIM_IS                                     ~19     !0, 'key'
         25        ISSET_ISEMPTY_DIM_OBJ                         0          ~19, !2
         26      > JMPZ                                                     ~20, ->31
         27    >   FETCH_DIM_R                                      ~21     !0, 'key'
         28        FETCH_DIM_R                                      ~22     ~21, !2
         29        QM_ASSIGN                                        ~23     ~22
         30      > JMP                                                      ->32
         31    >   QM_ASSIGN                                        ~23     null
         32    >   INIT_ARRAY                                       ~24     ~23, 'key'
   18    33        FETCH_DIM_IS                                     ~25     !0, 'value'
         34        ISSET_ISEMPTY_DIM_OBJ                         0          ~25, !2
         35      > JMPZ                                                     ~26, ->40
         36    >   FETCH_DIM_R                                      ~27     !0, 'value'
         37        FETCH_DIM_R                                      ~28     ~27, !2
         38        QM_ASSIGN                                        ~29     ~28
         39      > JMP                                                      ->41
   17    40    >   QM_ASSIGN                                        ~29     null
         41    >   ADD_ARRAY_ELEMENT                                ~24     ~29, 'value'
   16    42        ASSIGN_DIM                                               !1, !2
   17    43        OP_DATA                                                  ~24
   15    44        PRE_INC                                                  !2
         45    >   FETCH_DIM_R                                      ~31     !0, 'key'
         46        COUNT                                            ~32     ~31
         47        IS_SMALLER                                               !2, ~32
         48      > JMPNZ                                                    ~33, ->24
   22    49    >   INIT_FCALL                                               'print_r'
         50        SEND_VAR                                                 !1
         51        DO_ICALL                                                 
         52      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.06 ms | 1400 KiB | 15 Q