3v4l.org

run code in 300+ PHP versions simultaneously
<?php $options = Array ( '0' => Array ( 'value' => 180, 'label' => 'Nokia' ), '1' => Array ( 'value' => 2341, 'label' => 'Suisses' ), '2' => Array ( 'value' => 143, 'label' => 'Nokia' ), '3' => Array ( 'value' => 2389, 'label' => '3D Pop Art' ) ); foreach($options as $v){ $c[$v['label']][] = $v['value']; } print_r($c);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 9
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/62dv0
function name:  (null)
number of ops:  14
compiled vars:  !0 = $options, !1 = $v, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   28     1      > FE_RESET_R                                       $4      !0, ->9
          2    > > FE_FETCH_R                                               $4, !1, ->9
   29     3    >   FETCH_DIM_R                                      ~5      !1, 'label'
          4        FETCH_DIM_R                                      ~8      !1, 'value'
          5        FETCH_DIM_W                                      $6      !2, ~5
          6        ASSIGN_DIM                                               $6
          7        OP_DATA                                                  ~8
   28     8      > JMP                                                      ->2
          9    >   FE_FREE                                                  $4
   31    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.02 ms | 997 KiB | 14 Q