What is the issue with using array_intersect() to compare two arrays with nested arrays in PHP?

Using array_intersect() to compare two arrays with nested arrays in PHP will not work as expected because array_intersect() only compares the values of the arrays, not the structure of the nested arrays. To compare two arrays with nested arrays, you can use array_map() to recursively apply array_intersect() to each nested array.

function array_intersect_recursive($array1, $array2) {
    return array_map('array_intersect', $array1, $array2);
}
```

You can then use this function to compare two arrays with nested arrays like this:

```php
$array1 = [[1, 2], [3, 4]];
$array2 = [[1, 3], [2, 4]];

$result = array_intersect_recursive($array1, $array2);

print_r($result);