3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array('a' => $a, 'b' => $b, 'c' =>$c); foreach($array as $letter => $subArray){ foreach($subArray as $key => $values){ $newArray[$letter.$key] = $values['value']; } } $uniques = array_unique($newArray); //getting the non-repeated values $repeated = array_diff_assoc($newArray, $uniques); // stripping them out $final = array_unique($repeated); //cleaning the repeated values to just 1 of each print_r($final);
Finding entry points
Branch analysis from position: 0
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
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 15
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 15
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/crVJ7
function name:  (null)
number of ops:  35
compiled vars:  !0 = $array, !1 = $a, !2 = $b, !3 = $c, !4 = $subArray, !5 = $letter, !6 = $values, !7 = $key, !8 = $newArray, !9 = $uniques, !10 = $repeated, !11 = $final
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_ARRAY                                       ~12     !1, 'a'
          1        ADD_ARRAY_ELEMENT                                ~12     !2, 'b'
          2        ADD_ARRAY_ELEMENT                                ~12     !3, 'c'
          3        ASSIGN                                                   !0, ~12
    3     4      > FE_RESET_R                                       $14     !0, ->17
          5    > > FE_FETCH_R                                       ~15     $14, !4, ->17
          6    >   ASSIGN                                                   !5, ~15
    4     7      > FE_RESET_R                                       $17     !4, ->15
          8    > > FE_FETCH_R                                       ~18     $17, !6, ->15
          9    >   ASSIGN                                                   !7, ~18
    5    10        CONCAT                                           ~20     !5, !7
         11        FETCH_DIM_R                                      ~22     !6, 'value'
         12        ASSIGN_DIM                                               !8, ~20
         13        OP_DATA                                                  ~22
    4    14      > JMP                                                      ->8
         15    >   FE_FREE                                                  $17
    3    16      > JMP                                                      ->5
         17    >   FE_FREE                                                  $14
    9    18        INIT_FCALL                                               'array_unique'
         19        SEND_VAR                                                 !8
         20        DO_ICALL                                         $23     
         21        ASSIGN                                                   !9, $23
   10    22        INIT_FCALL                                               'array_diff_assoc'
         23        SEND_VAR                                                 !8
         24        SEND_VAR                                                 !9
         25        DO_ICALL                                         $25     
         26        ASSIGN                                                   !10, $25
   11    27        INIT_FCALL                                               'array_unique'
         28        SEND_VAR                                                 !10
         29        DO_ICALL                                         $27     
         30        ASSIGN                                                   !11, $27
   13    31        INIT_FCALL                                               'print_r'
         32        SEND_VAR                                                 !11
         33        DO_ICALL                                                 
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.47 ms | 1400 KiB | 19 Q