3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php print_r(array_diff([],['test'])); print_r(array_diff(['test'],[])); print_r(array_diff(null,['test'])); print_r(array_diff(['test'],null));
Output for 5.6.30
Array ( ) Array ( [0] => test ) Warning: array_diff(): Argument #1 is not an array in /in/RjIlK on line 4 Warning: array_diff(): Argument #2 is not an array in /in/RjIlK on line 5