3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(); $a["100"] = true; echo "$a is an associative map: ".var_export($a); $keys = array_keys($a); echo "It has these keys: ".var_export($keys); var_dump( is_string($keys[0]) );
Output for 5.4.0 - 7.2.0
Notice: Array to string conversion in /in/4KJ6J on line 4 array ( 100 => true, )Array is an associative map: array ( 0 => 100, )It has these keys: bool(false)
Output for 4.3.0 - 5.3.29
array ( 100 => true, )Array is an associative map: array ( 0 => 100, )It has these keys: bool(false)