- var_dump: documentation ( source)
- array_intersect: documentation ( source)
<?php
$a = [
'foo' => null,
];
$b = [
'foo' => 'str',
];
$c = [
'foo' => [1, 3],
];
echo "1:\n";
var_dump(array_intersect($a, $b));
echo "\n2:\n";
var_dump(array_intersect($b, $c));