3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = [ 0 => [ "id" => 76, "id_sender" => 1, "id_receiver" => 2, "message" => "2 Miliar", "is_read" => 0, "created_at" => "2022-11-28T13:57:17.000000Z", "updated_at" => "2022-11-28T13:57:17.000000Z" ], 1 => [ "id" => 75, "id_sender" => 1, "id_receiver" => 3, "message" => "1 Miliar", "is_read" => 0, "created_at" => "2022-11-28T13:57:10.000000Z", "updated_at" => "2022-11-28T13:57:10.000000Z" ], 2 => [ "id" => 74, "id_sender" => 3, "id_receiver" => 1, "message" => "Property ini berapa harganya?", "is_read" => 1, "created_at" => "2022-11-28T13:52:57.000000Z", "updated_at" => "2022-11-28T13:55:37.000000Z" ], 3 => [ "id" => 73, "id_sender" => 2, "id_receiver" => 1, "message" => "Untuk yang ini berapa harganya?", "is_read" => 1, "created_at" => "2022-11-28T13:07:34.000000Z", "updated_at" => "2022-11-28T13:55:33.000000Z" ] ]; $result = []; foreach ($array as $row) { $ids = [$row['id_sender'], $row['id_receiver']]; sort($ids); $result[implode(',', $ids)] ??= $row; } var_export(array_values($result));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 23
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 23
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/ss80H
function name:  (null)
number of ops:  31
compiled vars:  !0 = $array, !1 = $result, !2 = $row, !3 = $ids
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   42     1        ASSIGN                                                       !1, <array>
   43     2      > FE_RESET_R                                           $6      !0, ->23
          3    > > FE_FETCH_R                                                   $6, !2, ->23
   44     4    >   FETCH_DIM_R                                          ~7      !2, 'id_sender'
          5        INIT_ARRAY                                           ~8      ~7
          6        FETCH_DIM_R                                          ~9      !2, 'id_receiver'
          7        ADD_ARRAY_ELEMENT                                    ~8      ~9
          8        ASSIGN                                                       !3, ~8
   45     9        INIT_FCALL                                                   'sort'
         10        SEND_REF                                                     !3
         11        DO_ICALL                                                     
   46    12        FRAMELESS_ICALL_2                implode             ~12     '%2C', !3
         13        COPY_TMP                                             ~13     ~12
         14        FETCH_DIM_IS                                         ~14     !1, ~12
         15        COALESCE                                             ~15     ~14
         16        ASSIGN_DIM                                           ~16     !1, ~13
         17        OP_DATA                                                      !2
         18        QM_ASSIGN                                            ~15     ~16
         19      > JMP                                                          ->21
         20*       FREE                                                         ~13
         21    >   FREE                                                         ~15
   43    22      > JMP                                                          ->3
         23    >   FE_FREE                                                      $6
   48    24        INIT_FCALL                                                   'var_export'
         25        INIT_FCALL                                                   'array_values'
         26        SEND_VAR                                                     !1
         27        DO_ICALL                                             $17     
         28        SEND_VAR                                                     $17
         29        DO_ICALL                                                     
         30      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.11 ms | 1826 KiB | 16 Q