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) { $x = is_array($x)?$x['id']:$x; $y = is_array($y)?$y['id']:$y; return $x-$y; }); var_dump($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7u8dn
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%2F7u8dn%3A11%240'
   16     6        SEND_VAL                                                 ~5
          7        DO_ICALL                                         $6      
   11     8        ASSIGN                                                   !2, $6
   18     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F7u8dn%3A11%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
Branch analysis from position: 14
filename:       /in/7u8dn
function name:  {closure}
number of ops:  19
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        TYPE_CHECK                                  128          !0
          3      > JMPZ                                                     ~2, ->7
          4    >   FETCH_DIM_R                                      ~3      !0, 'id'
          5        QM_ASSIGN                                        ~4      ~3
          6      > JMP                                                      ->8
          7    >   QM_ASSIGN                                        ~4      !0
          8    >   ASSIGN                                                   !0, ~4
   14     9        TYPE_CHECK                                  128          !1
         10      > JMPZ                                                     ~6, ->14
         11    >   FETCH_DIM_R                                      ~7      !1, 'id'
         12        QM_ASSIGN                                        ~8      ~7
         13      > JMP                                                      ->15
         14    >   QM_ASSIGN                                        ~8      !1
         15    >   ASSIGN                                                   !1, ~8
   15    16        SUB                                              ~10     !0, !1
         17      > RETURN                                                   ~10
   16    18*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.41 ms | 1392 KiB | 17 Q