3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ "name" => [ "0" => "third.png", "1" => "second.png", "2" => "first.png", ], "type" => [ "0" => "image/png", "1" => "image/png", "2" => "image/png", ], "tmp_name" => [ "0" => "/opt/lampp/temp/phpOPmQcB", "1" => "/opt/lampp/temp/phpk0j1yp", "2" => "/opt/lampp/temp/phpS2mhVd", ], "error" => [ "0" => 0, "1" => 0, "2" => 0, ], "size" => [ "0" => 179440, "1" => 102238, "2" => 75915, ], ]; $keys = array_keys($arr); $count = count($arr[$keys[0]]); for($i = 0; $i<$count; $i++){ foreach($keys as $val){ $new[$i][$val] = $arr[$val][$i]; } } var_dump($new);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 11
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 19
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 11
Branch analysis from position: 23
Branch analysis from position: 11
Branch analysis from position: 19
filename:       /in/4g40N
function name:  (null)
number of ops:  27
compiled vars:  !0 = $arr, !1 = $keys, !2 = $count, !3 = $i, !4 = $val, !5 = $new
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   40     1        INIT_FCALL                                               'array_keys'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $7      
          4        ASSIGN                                                   !1, $7
   41     5        FETCH_DIM_R                                      ~9      !1, 0
          6        FETCH_DIM_R                                      ~10     !0, ~9
          7        COUNT                                            ~11     ~10
          8        ASSIGN                                                   !2, ~11
   43     9        ASSIGN                                                   !3, 0
         10      > JMP                                                      ->21
   44    11    > > FE_RESET_R                                       $14     !1, ->19
         12    > > FE_FETCH_R                                               $14, !4, ->19
   45    13    >   FETCH_DIM_R                                      ~17     !0, !4
         14        FETCH_DIM_R                                      ~18     ~17, !3
         15        FETCH_DIM_W                                      $15     !5, !3
         16        ASSIGN_DIM                                               $15, !4
         17        OP_DATA                                                  ~18
   44    18      > JMP                                                      ->12
         19    >   FE_FREE                                                  $14
   43    20        PRE_INC                                                  !3
         21    >   IS_SMALLER                                               !3, !2
         22      > JMPNZ                                                    ~20, ->11
   49    23    >   INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !5
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.31 ms | 1439 KiB | 15 Q