3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ [ 'firstName' => 'T', 'lastName' => 'B', 'email' => 'glh@gmail.com' ], [ 'firstName' => 'L', 'lastName' => 'Kr', 'email' => 'email1@gmail.com' ], [ 'firstName' => 'T', 'lastName' => 'B', 'email' => 'glh@gmail.com' ] ]; $res = array_intersect_key($arr, array_unique(array_column($arr, 'email'))); print_r($res);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ThTvi
function name:  (null)
number of ops:  17
compiled vars:  !0 = $arr, !1 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   20     1        INIT_FCALL                                               'array_intersect_key'
          2        SEND_VAR                                                 !0
          3        INIT_FCALL                                               'array_unique'
          4        INIT_FCALL                                               'array_column'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 'email'
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                         $4      
         10        SEND_VAR                                                 $4
         11        DO_ICALL                                         $5      
         12        ASSIGN                                                   !1, $5
   21    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.17 ms | 1012 KiB | 17 Q