3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array( array('ITEM' => 1), array('ITEM' => 2), array('ITEM' => 3), ); $array2 = array( array('ITEMID' => 2), array('ITEMID' => 3), array('ITEMID' => 1), array('ITEMID' => 4), ); // PHP7.4+ (arrow functions) var_export( array_udiff($array2, $array1, fn($a, $b) => ($a['ITEM'] ?? $a['ITEMID']) <=> ($b['ITEM'] ?? $b['ITEMID'])) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GIX20
function name:  (null)
number of ops:  12
compiled vars:  !0 = $array1, !1 = $array2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, <array>
   17     2        INIT_FCALL                                               'var_export'
   18     3        INIT_FCALL                                               'array_udiff'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !0
          6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FGIX20%3A18%240'
          7        SEND_VAL                                                 ~4
          8        DO_ICALL                                         $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                                 
   19    11      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FGIX20%3A18%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.52 ms | 1395 KiB | 17 Q