3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = [ [ 'quantity' => 13, 'idname' => 3, 'x_name' => 'Name-3' ], [ 'quantity' => 5, 'idname' => 4, 'x_name' => 'Name-4' ] ]; $array2 = [ [ 'id_x' => 3, 'x_name' => 'Name-3', 'id_l' => 4 ], [ 'id_x' => 4, 'x_name' => 'Name-4', 'id_l' => 8 ], [ 'id_x' => 5, 'x_name' => 'Name-5', 'id_l' => 7 ], [ 'id_x' => 6, 'x_name' => 'Name-6', 'id_l' => 5 ] ]; var_export( array_udiff( $array2, $array1, fn($a, $b) => [$a['idname'] ?? $a['id_x'], $a['x_name']] <=> [$b['idname'] ?? $b['id_x'], $b['x_name']] ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ducYR
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>
   16     1        ASSIGN                                                   !1, <array>
   40     2        INIT_FCALL                                               'var_export'
   41     3        INIT_FCALL                                               'array_udiff'
   42     4        SEND_VAR                                                 !1
   43     5        SEND_VAR                                                 !0
   44     6        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
   47     7        SEND_VAL                                                 ~4
   41     8        DO_ICALL                                         $5      
   47     9        SEND_VAR                                                 $5
   40    10        DO_ICALL                                                 
   48    11      > 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/ducYR
function name:  {closure}
number of ops:  19
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   44     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        FETCH_DIM_IS                                     ~2      !0, 'idname'
          3        COALESCE                                         ~3      ~2
          4        FETCH_DIM_R                                      ~4      !0, 'id_x'
          5        QM_ASSIGN                                        ~3      ~4
          6        INIT_ARRAY                                       ~5      ~3
          7        FETCH_DIM_R                                      ~6      !0, 'x_name'
          8        ADD_ARRAY_ELEMENT                                ~5      ~6
   46     9        FETCH_DIM_IS                                     ~7      !1, 'idname'
         10        COALESCE                                         ~8      ~7
         11        FETCH_DIM_R                                      ~9      !1, 'id_x'
         12        QM_ASSIGN                                        ~8      ~9
         13        INIT_ARRAY                                       ~10     ~8
         14        FETCH_DIM_R                                      ~11     !1, 'x_name'
         15        ADD_ARRAY_ELEMENT                                ~10     ~11
         16        SPACESHIP                                        ~12     ~5, ~10
         17      > RETURN                                                   ~12
   47    18*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.51 ms | 1012 KiB | 15 Q