3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(1,2,3,4); $b = array(1,2,3=>array('3a'),4); print_r( array_intersect($a, $b) );
Output for 7.0.0 - 7.2.0
Notice: Array to string conversion in /in/LPMCK on line 6 Notice: Array to string conversion in /in/LPMCK on line 6 Array ( [0] => 1 [1] => 2 [3] => 4 )
Output for 5.4.12 - 5.6.28
Notice: Array to string conversion in /in/LPMCK on line 6 Notice: Array to string conversion in /in/LPMCK on line 6 Notice: Array to string conversion in /in/LPMCK on line 6 Array ( [0] => 1 [1] => 2 [3] => 4 )
Output for 5.3.22 - 5.3.29
Array ( [0] => 1 [1] => 2 [3] => 4 )