3v4l.org

run code in 300+ PHP versions simultaneously
<?php $products = array( 0 => array('name' => 'product_one', 'category' => 'category_one', 'employee' => '3234'), 1 => array('name' => 'product_two', 'category' => 'category_two', 'employee' => '5421'), 2 => array('name' => 'product_three', 'category' => 'category_one', 'employee' => '3234'), 3 => array('name' => 'product_one', 'category' => 'category_one', 'employee' => '2153'), 4 => array('name' => 'product_one', 'category' => 'category_two', 'employee' => '6312') ); $output = array(); foreach ($products as $p) { $output["{$p['name']}##{$p['category']}"] = $p; } $output = array_values($output); print_r($output);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 12
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 12
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/jQDb0
function name:  (null)
number of ops:  21
compiled vars:  !0 = $products, !1 = $output, !2 = $p
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   11     1        ASSIGN                                                   !1, <array>
   12     2      > FE_RESET_R                                       $5      !0, ->12
          3    > > FE_FETCH_R                                               $5, !2, ->12
   13     4    >   FETCH_DIM_R                                      ~6      !2, 'name'
          5        ROPE_INIT                                     3  ~9      ~6
          6        ROPE_ADD                                      1  ~9      ~9, '%23%23'
          7        FETCH_DIM_R                                      ~7      !2, 'category'
          8        ROPE_END                                      2  ~8      ~9, ~7
          9        ASSIGN_DIM                                               !1, ~8
         10        OP_DATA                                                  !2
   12    11      > JMP                                                      ->3
         12    >   FE_FREE                                                  $5
   16    13        INIT_FCALL                                               'array_values'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $12     
         16        ASSIGN                                                   !1, $12
   17    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.36 ms | 942 KiB | 18 Q