3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = Array ( "category_id" => Array ( 0 => 1, 1 => 4, ), "pay_type_id" => Array ( 0 => 2, 1 => 5, ), "frequency_id" => Array ( 0 => 3, 1 => 6, ), ); $i=0; foreach($arr as $key => $value) { foreach ($value as $k => $v) { $postData[$k][$key] = $v; } } print_r($postData);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 12
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/SY6t8
function name:  (null)
number of ops:  19
compiled vars:  !0 = $arr, !1 = $i, !2 = $value, !3 = $key, !4 = $v, !5 = $k, !6 = $postData
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   24     1        ASSIGN                                                   !1, 0
   25     2      > FE_RESET_R                                       $9      !0, ->14
          3    > > FE_FETCH_R                                       ~10     $9, !2, ->14
          4    >   ASSIGN                                                   !3, ~10
   27     5      > FE_RESET_R                                       $12     !2, ->12
          6    > > FE_FETCH_R                                       ~13     $12, !4, ->12
          7    >   ASSIGN                                                   !5, ~13
   28     8        FETCH_DIM_W                                      $15     !6, !5
          9        ASSIGN_DIM                                               $15, !3
         10        OP_DATA                                                  !4
   27    11      > JMP                                                      ->6
         12    >   FE_FREE                                                  $12
   25    13      > JMP                                                      ->3
         14    >   FE_FREE                                                  $9
   32    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !6
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
132.5 ms | 1000 KiB | 14 Q