3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(true => true,false => false,);var_dump($a, array_key_exists(true, $a));
based on EvrBV
Output for 4.3.2 - 5.6.28, 7.0.0 - 7.1.0
Warning: array_key_exists(): The first argument should be either a string or an integer in /in/9YtYq on line 2 array(2) { [1]=> bool(true) [0]=> bool(false) } bool(false)
Output for hhvm-3.10.0 - 3.12.0
Warning: Array key should be either a string or an integer in /in/9YtYq on line 2 array(2) { [1]=> bool(true) [0]=> bool(false) } bool(false)
Output for 4.3.0 - 4.3.1
Warning: array_key_exists() [http://www.php.net/function.array-key-exists]: The first argument should be either a string or an integer in /in/9YtYq on line 2 array(0) { } bool(false)