3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numbers = [ ['number' => 3], ['number' => 4], ['number' => 6], ['number' => 9], ]; $keyValues = [ ['key' => 1, 'val' => 'one'], ['key' => 3, 'val' => 'three'], ['key' => 5, 'val' => 'five'], ['key' => 7, 'val' => 'seven'], ['key' => 9, 'val' => 'nine'], ]; var_export( array_uintersect( $keyValues, $numbers, fn($a, $b) => ($a['number'] ?? $a['key']) <=> ($b['number'] ?? $b['key']) ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kTXmj
function name:  (null)
number of ops:  12
compiled vars:  !0 = $numbers, !1 = $keyValues
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1        ASSIGN                                                   !1, <array>
   18     2        INIT_FCALL                                               'var_export'
   19     3        INIT_FCALL                                               'array_uintersect'
   20     4        SEND_VAR                                                 !1
   21     5        SEND_VAR                                                 !0
   22     6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FkTXmj%3A22%240'
   23     7        SEND_VAL                                                 ~4
          8        DO_ICALL                                         $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                                 
   24    11      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FkTXmj%3A22%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kTXmj
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        FETCH_DIM_IS                                     ~2      !0, 'number'
          3        COALESCE                                         ~3      ~2
          4        FETCH_DIM_R                                      ~4      !0, 'key'
          5        QM_ASSIGN                                        ~3      ~4
          6        FETCH_DIM_IS                                     ~5      !1, 'number'
          7        COALESCE                                         ~6      ~5
          8        FETCH_DIM_R                                      ~7      !1, 'key'
          9        QM_ASSIGN                                        ~6      ~7
         10        SPACESHIP                                        ~8      ~3, ~6
         11      > RETURN                                                   ~8
   23    12*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FkTXmj%3A22%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.5 ms | 1399 KiB | 17 Q