3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ar = [ ["uid" => 1, "title" => "Title A", "tstamp" => "1580296755",], ["uid" => 2, "title" => "Title B", "tstamp" => "1580296755",], ["uid" => 3, "title" => "Title B", "tstamp" => "1580296755",], ["uid" => 4, "title" => "Title C", "tstamp" => "1580296755",], ]; $tmp = []; $res = []; foreach($ar as $ind=>$set){ $tmp[$set['title']] = $ind; } foreach($tmp as $title=>$ind){ $res[] = $ar[$ind]; } print_r($res);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 18
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 10
filename:       /in/Fjdk2
function name:  (null)
number of ops:  23
compiled vars:  !0 = $ar, !1 = $tmp, !2 = $res, !3 = $set, !4 = $ind, !5 = $title
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, <array>
   11     2        ASSIGN                                                   !2, <array>
   12     3      > FE_RESET_R                                       $9      !0, ->10
          4    > > FE_FETCH_R                                       ~10     $9, !3, ->10
          5    >   ASSIGN                                                   !4, ~10
   13     6        FETCH_DIM_R                                      ~12     !3, 'title'
          7        ASSIGN_DIM                                               !1, ~12
          8        OP_DATA                                                  !4
   12     9      > JMP                                                      ->4
         10    >   FE_FREE                                                  $9
   16    11      > FE_RESET_R                                       $14     !1, ->18
         12    > > FE_FETCH_R                                       ~15     $14, !4, ->18
         13    >   ASSIGN                                                   !5, ~15
   17    14        FETCH_DIM_R                                      ~18     !0, !4
         15        ASSIGN_DIM                                               !2
         16        OP_DATA                                                  ~18
   16    17      > JMP                                                      ->12
         18    >   FE_FREE                                                  $14
   19    19        INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.08 ms | 1002 KiB | 14 Q