3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array[] = ["name"=>"KIT", "v1"=>"val1", "v2"=>"val2", "v3"=>"val3"]; $array[] = ["name"=>"BAT", "v1"=>"val1", "v2"=>"val2", "v3"=>"val3"]; $array[] = ["name"=>"ISL", "v1"=>"val1", "v2"=>"val1", "v3"=>"val1"]; $array[] = ["name"=>"KIT", "v1"=>"val4", "v2"=>"val2", "v3"=>"val2"]; $array[] = ["name"=>"BAT", "v1"=>"val1", "v2"=>"val2", "v3"=>"val1"]; $array[] = ["name"=>"ENS", "v1"=>"val1", "v2"=>"val2", "v3"=>"val3"]; $array[] = ["name"=>"ENS", "v1"=>"val3", "v2"=>"val2", "v3"=>"val1"]; foreach ($array as $value) { $name = $value["name"]; foreach(array_slice($value,1) as $val){ $group_arr[$name][] = $val; } } var_dump($group_arr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 30
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 30
Branch analysis from position: 16
2 jumps found. (Code = 77) Position 1 = 23, Position 2 = 28
Branch analysis from position: 23
2 jumps found. (Code = 78) Position 1 = 24, Position 2 = 28
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 28
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/ebuFt
function name:  (null)
number of ops:  35
compiled vars:  !0 = $array, !1 = $value, !2 = $name, !3 = $val, !4 = $group_arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0
          1        OP_DATA                                                  <array>
    4     2        ASSIGN_DIM                                               !0
          3        OP_DATA                                                  <array>
    5     4        ASSIGN_DIM                                               !0
          5        OP_DATA                                                  <array>
    6     6        ASSIGN_DIM                                               !0
          7        OP_DATA                                                  <array>
    7     8        ASSIGN_DIM                                               !0
          9        OP_DATA                                                  <array>
    8    10        ASSIGN_DIM                                               !0
         11        OP_DATA                                                  <array>
    9    12        ASSIGN_DIM                                               !0
         13        OP_DATA                                                  <array>
   12    14      > FE_RESET_R                                       $12     !0, ->30
         15    > > FE_FETCH_R                                               $12, !1, ->30
   13    16    >   FETCH_DIM_R                                      ~13     !1, 'name'
         17        ASSIGN                                                   !2, ~13
   14    18        INIT_FCALL                                               'array_slice'
         19        SEND_VAR                                                 !1
         20        SEND_VAL                                                 1
         21        DO_ICALL                                         $15     
         22      > FE_RESET_R                                       $16     $15, ->28
         23    > > FE_FETCH_R                                               $16, !3, ->28
   15    24    >   FETCH_DIM_W                                      $17     !4, !2
         25        ASSIGN_DIM                                               $17
         26        OP_DATA                                                  !3
   14    27      > JMP                                                      ->23
         28    >   FE_FREE                                                  $16
   12    29      > JMP                                                      ->15
         30    >   FE_FREE                                                  $12
   18    31        INIT_FCALL                                               'var_dump'
         32        SEND_VAR                                                 !4
         33        DO_ICALL                                                 
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.62 ms | 1012 KiB | 15 Q