3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red"); $array2 = array("a" => "green", "b" => "yellow", "red"); $result = array_diff_key($array1, $array2); var_dump($result, $array1, $array2);
Output for 5.1.0 - 7.1.7
array(1) { ["c"]=> string(4) "blue" } array(4) { ["a"]=> string(5) "green" ["b"]=> string(5) "brown" ["c"]=> string(4) "blue" [0]=> string(3) "red" } array(3) { ["a"]=> string(5) "green" ["b"]=> string(6) "yellow" [0]=> string(3) "red" }
Output for 5.0.0 - 5.0.5
Fatal error: Call to undefined function array_diff_key() in /in/lansv on line 5
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: array_diff_key() in /in/lansv on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: array_diff_key() in /in/lansv on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: array_diff_key() in /in/lansv on line 5