3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $plotsOpenSpace2 = '111 222 333'; $plotsShell2 = '555 222 444'; $plotsOther2 = '000 999 666'; $entries = array($plotsOpenSpace2, $plotsShell2, $plotsOther2); $test = array(111, 222, 465, 555, 666, 777); foreach ($entries as $key => $entry) { $matches = array_intersect($test, $entry); if (count($matches) > 0) { $i ++; echo 'test'; } } ?>
Output for 4.3.2 - 7.1.0
Warning: array_intersect(): Argument #2 is not an array in /in/HqCqa on line 11 Warning: array_intersect(): Argument #2 is not an array in /in/HqCqa on line 11 Warning: array_intersect(): Argument #2 is not an array in /in/HqCqa on line 11
Output for 4.3.0 - 4.3.1
Warning: array_intersect() [http://www.php.net/function.array-intersect]: Argument #2 is not an array in /in/HqCqa on line 11 Warning: array_intersect() [http://www.php.net/function.array-intersect]: Argument #2 is not an array in /in/HqCqa on line 11 Warning: array_intersect() [http://www.php.net/function.array-intersect]: Argument #2 is not an array in /in/HqCqa on line 11