3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(array_diff(array(1, 2, 4, 5)+array(1, 2), array_intersect(array(1, 2, 4, 5)+array(1, 2))));
Output for 5.3.0 - 7.1.0
Warning: array_intersect(): at least 2 parameters are required, 1 given in /in/OD354 on line 2 Warning: array_diff(): Argument #2 is not an array in /in/OD354 on line 2 NULL
Output for 4.3.2 - 5.2.17
Warning: Wrong parameter count for array_intersect() in /in/OD354 on line 2 Warning: array_diff(): Argument #2 is not an array in /in/OD354 on line 2 NULL
Output for 4.3.0 - 4.3.1
Warning: Wrong parameter count for array_intersect() in /in/OD354 on line 2 Warning: array_diff() [http://www.php.net/function.array-diff]: Argument #2 is not an array in /in/OD354 on line 2 NULL