3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array ( 0 => array ( 'description' => '5390BF675E1464F32202B', 'to_email' => 'test@test.com' ), 1 => array ( 'description' => '5390BF675E1464F32202B', 'to_email' => 'test3@test.com' ), 2 => array ( 'description' => '5390BF675E1464F32202B', 'to_email' => 'testagain@gmail.com' ) ); $array2 = array ( 0 => array ( 'to_email' => 'test@test.com' ), 1 => array ( 'to_email' => 'test3@test.com' ) ); $exclude_ids = array_column($array2, 'to_email', 'to_email'); $output = array_filter($array1, function ($v) use ($exclude_ids) { return !isset($exclude_ids[$v['to_email']]); }); print_r($output);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m7sCk
function name:  (null)
number of ops:  19
compiled vars:  !0 = $array1, !1 = $array2, !2 = $exclude_ids, !3 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   20     1        ASSIGN                                                   !1, <array>
   31     2        INIT_FCALL                                               'array_column'
          3        SEND_VAR                                                 !1
          4        SEND_VAL                                                 'to_email'
          5        SEND_VAL                                                 'to_email'
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !2, $6
   32     8        INIT_FCALL                                               'array_filter'
          9        SEND_VAR                                                 !0
         10        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fm7sCk%3A32%240'
         11        BIND_LEXICAL                                             ~8, !2
   34    12        SEND_VAL                                                 ~8
         13        DO_ICALL                                         $9      
   32    14        ASSIGN                                                   !3, $9
   35    15        INIT_FCALL                                               'print_r'
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fm7sCk%3A32%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/m7sCk
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $v, !1 = $exclude_ids
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   33     2        FETCH_DIM_R                                      ~2      !0, 'to_email'
          3        ISSET_ISEMPTY_DIM_OBJ                         0  ~3      !1, ~2
          4        BOOL_NOT                                         ~4      ~3
          5      > RETURN                                                   ~4
   34     6*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fm7sCk%3A32%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.18 ms | 1396 KiB | 19 Q