3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array("a" => "apple", "orange", "peach", "orange"); $a = array("b" => "apple", "banana", "orange"); $r = array_diff($a, $b); print_r($r);
Output for 5.0.4 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined variable: b in /in/WSRmt on line 6 Warning: array_diff(): Argument #2 is not an array in /in/WSRmt on line 6
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined variable: b in /in/WSRmt on line 6 Warning: array_diff() expects parameter 2 to be an array or collection in /in/WSRmt on line 6
Output for 4.3.2 - 5.0.3
Notice: Undefined variable: b in /in/WSRmt on line 6 Warning: array_diff(): Argument #2 is not an array in /in/WSRmt on line 6
Output for 4.3.0 - 4.3.1
Notice: Undefined variable: b in /in/WSRmt on line 6 Warning: array_diff() [http://www.php.net/function.array-diff]: Argument #2 is not an array in /in/WSRmt on line 6