3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ ['123', 'aaa'], ['124', 'bbb'], ['124', 'ccc'], ['125', 'ddd'], ['124', 'eee'], ['123', 'fff'], ]; var_export( array_reverse(array_column(array_reverse($array), null, 0)) ); $result = []; foreach ($array as $row) { if (!isset($result[$row[0]])) { $result[$row[0]] = $row; } } var_export(array_values($result));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 26
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 26
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 25
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 25
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/kCHOq
function name:  (null)
number of ops:  34
compiled vars:  !0 = $array, !1 = $result, !2 = $row
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   12     1        INIT_FCALL                                                   'var_export'
   13     2        INIT_FCALL                                                   'array_reverse'
          3        INIT_FCALL                                                   'array_column'
          4        INIT_FCALL                                                   'array_reverse'
          5        SEND_VAR                                                     !0
          6        DO_ICALL                                             $4      
          7        SEND_VAR                                                     $4
          8        SEND_VAL                                                     null
          9        SEND_VAL                                                     0
         10        DO_ICALL                                             $5      
         11        SEND_VAR                                                     $5
         12        DO_ICALL                                             $6      
         13        SEND_VAR                                                     $6
   12    14        DO_ICALL                                                     
   16    15        ASSIGN                                                       !1, <array>
   17    16      > FE_RESET_R                                           $9      !0, ->26
         17    > > FE_FETCH_R                                                   $9, !2, ->26
   18    18    >   FETCH_DIM_R                                          ~10     !2, 0
         19        ISSET_ISEMPTY_DIM_OBJ                             0  ~11     !1, ~10
         20        BOOL_NOT                                             ~12     ~11
         21      > JMPZ                                                         ~12, ->25
   19    22    >   FETCH_DIM_R                                          ~13     !2, 0
         23        ASSIGN_DIM                                                   !1, ~13
         24        OP_DATA                                                      !2
   17    25    > > JMP                                                          ->17
         26    >   FE_FREE                                                      $9
   23    27        INIT_FCALL                                                   'var_export'
         28        INIT_FCALL                                                   'array_values'
         29        SEND_VAR                                                     !1
         30        DO_ICALL                                             $15     
         31        SEND_VAR                                                     $15
         32        DO_ICALL                                                     
         33      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.13 ms | 2152 KiB | 17 Q