The array_intersect_key() function compares the keys of two or more arrays, and returns an array that contains the entries from array1 that are present in array2, array3, etc.
PHP array_intersect_key() function returns an array that contains the entries from array1 that are present in array2, array3, etc.