3v4l.org

run code in 300+ PHP versions simultaneously
<?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));

preferences:
26.22 ms | 405 KiB | 5 Q