3v4l.org

run code in 300+ PHP versions simultaneously
<?php $types = [ ['unique_codename' => 'cars', 'category' => 'vehicle', 'foo' => 'bar'], ['unique_codename' => 'fruit', 'category' => 'food', 'foo' => 'bar'], ['unique_codename' => 'vegetables', 'category' => 'food', 'foo' => 'bar'], ['unique_codename' => 'animals', 'category' => 'vehicle and food', 'foo' => 'bar'], ]; $products = [ ['codename' => 'fruit', 'name' => 'banana', 'other' => 'stuff'], ['codename' => 'fruit', 'name' => 'apple', 'other' => 'stuff'], ['codename' => 'vegetables', 'name' => 'cauliflower', 'other' => 'stuff'], ['codename' => 'cars', 'name' => 'audi', 'other' => 'stuff'], ['codename' => 'cars', 'name' => 'volvo', 'other' => 'stuff'], ]; foreach ($types as ['unique_codename' => $ucn, 'sorts' => &$ref[$ucn]]) { $ref[$ucn] = []; }; foreach ($products as ['codename' => $cn, 'name' => $ref[$cn][]['name']]); var_export($types);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 126) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 14
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 26
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 26
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
Branch analysis from position: 14
filename:       /in/X6GLY
function name:  (null)
number of ops:  31
compiled vars:  !0 = $types, !1 = $products, !2 = $ucn, !3 = $ref, !4 = $cn
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, <array>
   17     2      > FE_RESET_RW                                      $7      !0, ->14
          3    > > FE_FETCH_RW                                              $7, $8, ->14
          4    >   FETCH_LIST_R                                     $9      $8, 'unique_codename'
          5        ASSIGN                                                   !2, $9
          6        FETCH_LIST_W                                     $11     $8, 'sorts'
          7        MAKE_REF                                         $12     $11
          8        FETCH_DIM_W                                      $13     !3, !2
          9        ASSIGN_REF                                               $13, $12
         10        FREE                                                     $8
   18    11        ASSIGN_DIM                                               !3, !2
         12        OP_DATA                                                  <array>
   17    13      > JMP                                                      ->3
         14    >   FE_FREE                                                  $7
   20    15      > FE_RESET_R                                       $16     !1, ->26
         16    > > FE_FETCH_R                                               $16, $17, ->26
         17    >   FETCH_LIST_R                                     $18     $17, 'codename'
         18        ASSIGN                                                   !4, $18
         19        FETCH_LIST_R                                     $20     $17, 'name'
         20        FETCH_DIM_W                                      $21     !3, !4
         21        FETCH_DIM_W                                      $22     $21
         22        ASSIGN_DIM                                               $22, 'name'
         23        OP_DATA                                                  $20
         24        FREE                                                     $17
         25      > JMP                                                      ->16
         26    >   FE_FREE                                                  $16
   21    27        INIT_FCALL                                               'var_export'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.97 ms | 1011 KiB | 14 Q