3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Array1 = [ [ 'username' => 'uname1', 'name' => 'fullname1', 'email' => 'uname1@email.com' ], [ 'username' => 'uname2', 'name' => 'fullname2', 'email' => 'uname2@email.com' ], [ 'username' => 'uname3', 'name' => 'fullname3', 'email' => 'uname3@email.com' ], ]; $Array2 = [ [ 'username' => 'uname1', 'name' => 'fullname1', 'email' => 'uname1@email.com' ], ]; var_export( array_uintersect( $Array2, $Array1, fn($a, $b) => $a['email'] <=> $b['email'] ) ? 'email already exists' : 'no matches' );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eW958
function name:  (null)
number of ops:  16
compiled vars:  !0 = $Array1, !1 = $Array2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   21     1        ASSIGN                                                   !1, <array>
   29     2        INIT_FCALL                                               'var_export'
   30     3        INIT_FCALL                                               'array_uintersect'
   31     4        SEND_VAR                                                 !1
   32     5        SEND_VAR                                                 !0
   33     6        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
   34     7        SEND_VAL                                                 ~4
   30     8        DO_ICALL                                         $5      
   34     9      > JMPZ                                                     $5, ->12
   35    10    >   QM_ASSIGN                                        ~6      'email+already+exists'
         11      > JMP                                                      ->13
   36    12    >   QM_ASSIGN                                        ~6      'no+matches'
         13    >   SEND_VAL                                                 ~6
   29    14        DO_ICALL                                                 
   37    15      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eW958
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        FETCH_DIM_R                                      ~2      !0, 'email'
          3        FETCH_DIM_R                                      ~3      !1, 'email'
          4        SPACESHIP                                        ~4      ~2, ~3
          5      > RETURN                                                   ~4
   34     6*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.81 ms | 1011 KiB | 15 Q