3v4l.org

run code in 300+ PHP versions simultaneously
<?php $list = [ 0 =>[ 'nickname' => 'Bob', 'phone' => 15295892895, 'is_group' => 1, 'created_at' => 1544944181, 'assemble_id' => 'c1d0zUbmP', 'status' => 1 ], 1 =>[ 'nickname' => 'Jack', 'phone' => 15295892895, 'is_group' => 1, 'created_at' => 1544944181, 'assemble_id' => 'ED6OJX4VV', 'status' => 1 ], 2 =>[ 'nickname' => 'Grace', 'phone' => 15295892895, 'is_group' => 0, 'created_at' => 1544944181, 'assemble_id' => 'c1d0zUbmP', 'status' => 1 ], 3 =>[ 'nickname' => 'Jelly', 'phone' => 15295892895, 'is_group' => 0, 'created_at' => 1544944181, 'assemble_id' => 'ED6OJX4VV', 'status' => 1 ] ]; foreach ($list as $row) { $result[$row['assemble_id']]['assemble_id'] = $row['assemble_id']; $result[$row['assemble_id']]['assemble_group'][] = [ 'nickname' => $row['nickname'], 'phone' => $row['phone'], 'is_group' => $row['is_group'], 'created_at' => $row['created_at'], 'assemble_id' => $row['assemble_id'], 'status' => $row['status'] ]; } var_export(array_values($result));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 26
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 26
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/pTuMI
function name:  (null)
number of ops:  34
compiled vars:  !0 = $list, !1 = $row, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   37     1      > FE_RESET_R                                       $4      !0, ->26
          2    > > FE_FETCH_R                                               $4, !1, ->26
   38     3    >   FETCH_DIM_R                                      ~5      !1, 'assemble_id'
          4        FETCH_DIM_R                                      ~8      !1, 'assemble_id'
          5        FETCH_DIM_W                                      $6      !2, ~5
          6        ASSIGN_DIM                                               $6, 'assemble_id'
          7        OP_DATA                                                  ~8
   39     8        FETCH_DIM_R                                      ~9      !1, 'assemble_id'
   40     9        FETCH_DIM_R                                      ~13     !1, 'nickname'
         10        INIT_ARRAY                                       ~14     ~13, 'nickname'
   41    11        FETCH_DIM_R                                      ~15     !1, 'phone'
         12        ADD_ARRAY_ELEMENT                                ~14     ~15, 'phone'
   42    13        FETCH_DIM_R                                      ~16     !1, 'is_group'
         14        ADD_ARRAY_ELEMENT                                ~14     ~16, 'is_group'
   43    15        FETCH_DIM_R                                      ~17     !1, 'created_at'
         16        ADD_ARRAY_ELEMENT                                ~14     ~17, 'created_at'
   44    17        FETCH_DIM_R                                      ~18     !1, 'assemble_id'
         18        ADD_ARRAY_ELEMENT                                ~14     ~18, 'assemble_id'
   45    19        FETCH_DIM_R                                      ~19     !1, 'status'
         20        ADD_ARRAY_ELEMENT                                ~14     ~19, 'status'
   39    21        FETCH_DIM_W                                      $10     !2, ~9
         22        FETCH_DIM_W                                      $11     $10, 'assemble_group'
         23        ASSIGN_DIM                                               $11
   45    24        OP_DATA                                                  ~14
   37    25      > JMP                                                      ->2
         26    >   FE_FREE                                                  $4
   48    27        INIT_FCALL                                               'var_export'
         28        INIT_FCALL                                               'array_values'
         29        SEND_VAR                                                 !2
         30        DO_ICALL                                         $20     
         31        SEND_VAR                                                 $20
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.57 ms | 1401 KiB | 17 Q