3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = array(0 => 100, "color" => "red"); $keys = array_keys('fsd','ds'); print_r($keys[1]); echo $dd = count($key); ?>
based on X3qsq
Output for 7.2.0
Warning: array_keys() expects parameter 1 to be array, string given in /in/8IqCB on line 4 Notice: Undefined variable: key in /in/8IqCB on line 6 Warning: count(): Parameter must be an array or an object that implements Countable in /in/8IqCB on line 6 0
Output for 5.3.0 - 7.1.10
Warning: array_keys() expects parameter 1 to be array, string given in /in/8IqCB on line 4 Notice: Undefined variable: key in /in/8IqCB on line 6 0
Output for 5.0.4 - 5.2.17
Warning: array_keys(): The first argument should be an array in /in/8IqCB on line 4 Notice: Undefined variable: key in /in/8IqCB on line 6 0
Output for 4.3.2 - 5.0.3
Warning: array_keys(): The first argument should be an array in /in/8IqCB on line 4 Notice: Undefined variable: key in /in/8IqCB on line 6 0
Output for 4.3.0 - 4.3.1
Warning: array_keys() [http://www.php.net/function.array-keys]: The first argument should be an array in /in/8IqCB on line 4 Notice: Undefined variable: key in /in/8IqCB on line 6 0