3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input[0] = [ [1 => 5, 2 => 12, 11 => 15], [1 => 5, 2 => 12, 11 => 16], [1 => 4, 2 => 9, 11 => 15], [1 => 3, 2 => 9, 11 => 15], [1 => 3, 2 => 9, 11 => 16], [1 => 3, 2 => 13, 11 => 15], [1 => 3, 2 => 13, 11 => 16], [1 => 3, 2 => 12, 11 => 15], [1 => 3, 2 => 12, 11 => 16], [1 => 4, 2 => 9, 11 => 16], [1 => 4, 2 => 13, 11 => 15], [1 => 4, 2 => 13, 11 => 16], [1 => 4, 2 => 12, 11 => 15], [1 => 4, 2 => 12, 11 => 16], [1 => 5, 2 => 9, 11 => 15], [1 => 5, 2 => 13, 11 => 16] ]; $result = []; foreach ($input as $key => $array) { foreach ($array as [1 => $one, 2 => $two, 11 => $eleven]) { $result[$key][$one][$two][] = $eleven; } } var_export($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 23
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 23
Branch analysis from position: 5
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 21
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 21
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 21
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/SYJfi
function name:  (null)
number of ops:  28
compiled vars:  !0 = $input, !1 = $result, !2 = $array, !3 = $key, !4 = $one, !5 = $two, !6 = $eleven
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0, 0
    4     1        OP_DATA                                                  <array>
   22     2        ASSIGN                                                   !1, <array>
   23     3      > FE_RESET_R                                       $9      !0, ->23
          4    > > FE_FETCH_R                                       ~10     $9, !2, ->23
          5    >   ASSIGN                                                   !3, ~10
   24     6      > FE_RESET_R                                       $12     !2, ->21
          7    > > FE_FETCH_R                                               $12, $13, ->21
          8    >   FETCH_LIST_R                                     $14     $13, 1
          9        ASSIGN                                                   !4, $14
         10        FETCH_LIST_R                                     $16     $13, 2
         11        ASSIGN                                                   !5, $16
         12        FETCH_LIST_R                                     $18     $13, 11
         13        ASSIGN                                                   !6, $18
         14        FREE                                                     $13
   25    15        FETCH_DIM_W                                      $20     !1, !3
         16        FETCH_DIM_W                                      $21     $20, !4
         17        FETCH_DIM_W                                      $22     $21, !5
         18        ASSIGN_DIM                                               $22
         19        OP_DATA                                                  !6
   24    20      > JMP                                                      ->7
         21    >   FE_FREE                                                  $12
   23    22      > JMP                                                      ->4
         23    >   FE_FREE                                                  $9
   28    24        INIT_FCALL                                               'var_export'
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.32 ms | 1070 KiB | 14 Q