PHP array_udiff_assoc() Function

Compare the keys and values of two arrays (using a built-in function to compare the keys and a user-defined function to compare the values) array_udiff_assoc — Computes the difference of arrays with additional index check, compares data by a callback function.Computes the difference of arrays with additional index check, compares data by a callback function.The comparison function must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second. Note that before PHP 7.0.0 this integer had to be in the range from -2147483648 to 2147483647.

Example -

Example -