In what scenarios would you use array_intersect_key in PHP when working with arrays?

When working with arrays in PHP, you may need to find the intersection of keys between two or more arrays. This is where the `array_intersect_key` function comes in handy. It allows you to compare the keys of multiple arrays and return an array containing only the key-value pairs that are present in all arrays.

// Example of using array_intersect_key to find the intersection of keys between two arrays
$array1 = ['a' => 1, 'b' => 2, 'c' => 3];
$array2 = ['a' => 'apple', 'b' => 'banana', 'd' => 'orange'];

$intersect = array_intersect_key($array1, $array2);

print_r($intersect);
// Output: Array ( [a] => 1 [b] => 2 )