3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input =Array ( "TXN_DATE" => Array ( "21-AUG-21", "22-AUG-21", "23-AUG-21", "24-AUG-21", ), "O_TXN" => Array ( "50", "60", "70", "80", ), "O_TXN_AMT" => Array ( "5000", "6000", "7000", "8000", ), "R_TXN" => Array ( "20", "30", "40", "85", ), "R_TXN_AMT" => Array ( "6000", "7000", "8000", "8500", ) ); $output = []; foreach($input as $k=>$v){ foreach($v as $i=>$r){ $output[$i][$k] = $v[$i]; } } print_r($output); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 15
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 13
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 13
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/2cOrD
function name:  (null)
number of ops:  20
compiled vars:  !0 = $input, !1 = $output, !2 = $v, !3 = $k, !4 = $r, !5 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   40     1        ASSIGN                                                   !1, <array>
   41     2      > FE_RESET_R                                       $8      !0, ->15
          3    > > FE_FETCH_R                                       ~9      $8, !2, ->15
          4    >   ASSIGN                                                   !3, ~9
   42     5      > FE_RESET_R                                       $11     !2, ->13
          6    > > FE_FETCH_R                                       ~12     $11, !4, ->13
          7    >   ASSIGN                                                   !5, ~12
   43     8        FETCH_DIM_R                                      ~16     !2, !5
          9        FETCH_DIM_W                                      $14     !1, !5
         10        ASSIGN_DIM                                               $14, !3
         11        OP_DATA                                                  ~16
   42    12      > JMP                                                      ->6
         13    >   FE_FREE                                                  $11
   41    14      > JMP                                                      ->3
         15    >   FE_FREE                                                  $8
   46    16        INIT_FCALL                                               'print_r'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                                 
   47    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.24 ms | 1002 KiB | 14 Q