PHP array_diff_ukey() Function

The array_diff_ukey() function is used to compare two or more arrays using an additional user supplied function on the keys for comparison.The function compares the keys from array1 against the keys from array2 and returns the difference. This function is like array_diff() except the comparison is done on the keys instead of the values.

It compares the keys from array1 against the keys from array2 and returns the difference.

Example -