3v4l.org

run code in 300+ PHP versions simultaneously
<?php $one = [ ['id'=>182, 'data'=>'foo'], ['id'=>300, 'data'=>'bar'], ['id'=>8, 'data'=>'baz'], ['id'=>52, 'data'=>'bee'] ]; $two = [52, 300]; $result = array_uintersect($one, $two, function($x, $y) { var_dump($x, $y); $x = is_array($x)?$x['id']:$x; $y = is_array($y)?$y['id']:$x; return $x-$y; }); var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OEiI4
function name:  (null)
number of ops:  13
compiled vars:  !0 = $one, !1 = $two, !2 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, <array>
   11     2        INIT_FCALL                                               'array_uintersect'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FOEiI4%3A11%240'
   17     6        SEND_VAL                                                 ~5
          7        DO_ICALL                                         $6      
   11     8        ASSIGN                                                   !2, $6
   19     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FOEiI4%3A11%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
Branch analysis from position: 18
filename:       /in/OEiI4
function name:  {closure}
number of ops:  23
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   13     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                                 
   14     6        TYPE_CHECK                                  128          !0
          7      > JMPZ                                                     ~3, ->11
          8    >   FETCH_DIM_R                                      ~4      !0, 'id'
          9        QM_ASSIGN                                        ~5      ~4
         10      > JMP                                                      ->12
         11    >   QM_ASSIGN                                        ~5      !0
         12    >   ASSIGN                                                   !0, ~5
   15    13        TYPE_CHECK                                  128          !1
         14      > JMPZ                                                     ~7, ->18
         15    >   FETCH_DIM_R                                      ~8      !1, 'id'
         16        QM_ASSIGN                                        ~9      ~8
         17      > JMP                                                      ->19
         18    >   QM_ASSIGN                                        ~9      !0
         19    >   ASSIGN                                                   !1, ~9
   16    20        SUB                                              ~11     !0, !1
         21      > RETURN                                                   ~11
   17    22*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FOEiI4%3A11%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.98 ms | 1404 KiB | 17 Q