3v4l.org

run code in 500+ PHP versions simultaneously
<?php $d = [array ( 77 => Array ( 'Bold Condensed', 'Bold Condensed 2', 'Bold Condensed 3' ) ), array ( 77 => array ( 'Bold Condensed' ), 136 => array ( 'Regular' ) ), array ( 77 => array ( 'Bold Condensed (1, 2, 3)' ), 168 => array ( 'Regular', 'Bold' ) )]; $result = []; foreach($d as $subs){ foreach($subs as $id => $values){ $result[ $id ] = array_merge($result[ $id ] ?? [], $values); } } $result = array_map('array_unique', $result); print_r($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 19
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 19
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 17
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 17
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 17
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/hQYl5
function name:  (null)
number of ops:  29
compiled vars:  !0 = $d, !1 = $result, !2 = $subs, !3 = $values, !4 = $id
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   36     1        ASSIGN                                                       !1, <array>
   38     2      > FE_RESET_R                                           $7      !0, ->19
          3    > > FE_FETCH_R                                                   $7, !2, ->19
   39     4    > > FE_RESET_R                                           $8      !2, ->17
          5    > > FE_FETCH_R                                           ~9      $8, !3, ->17
          6    >   ASSIGN                                                       !4, ~9
   40     7        INIT_FCALL                                                   'array_merge'
          8        FETCH_DIM_IS                                         ~12     !1, !4
          9        COALESCE                                             ~13     ~12
         10        QM_ASSIGN                                            ~13     <array>
         11        SEND_VAL                                                     ~13
         12        SEND_VAR                                                     !3
         13        DO_ICALL                                             $14     
         14        ASSIGN_DIM                                                   !1, !4
         15        OP_DATA                                                      $14
   39    16      > JMP                                                          ->5
         17    >   FE_FREE                                                      $8
   38    18      > JMP                                                          ->3
         19    >   FE_FREE                                                      $7
   44    20        INIT_FCALL                                                   'array_map'
         21        SEND_VAL                                                     'array_unique'
         22        SEND_VAR                                                     !1
         23        DO_ICALL                                             $15     
         24        ASSIGN                                                       !1, $15
   46    25        INIT_FCALL                                                   'print_r'
         26        SEND_VAR                                                     !1
         27        DO_ICALL                                                     
         28      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
174.96 ms | 1763 KiB | 16 Q