3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array1 = array("a" => array(1)); $array2 = array("b" => array("1")); $a = array(1, 2, 3, 4); $b = array(2, 4, 5, 6); $result1 = array_intersect($a, $b); // 2 4 $result2 = array_intersect($a, $b); // 2 4 print_r($result1); print_r($result2); ?>
based on TJ0NM
Output for 4.3.0 - 7.2.0
Array ( [1] => 2 [3] => 4 ) Array ( [1] => 2 [3] => 4 )