3v4l.org

run code in 150+ 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 - 5.6.28, 7.0.0 - 7.1.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 hhvm-3.10.0 - 3.12.0
Notice: Array to string conversion in /in/4KJ6J on line 4 array ( 100 => true, )Array is an associative map: 1array ( 0 => 100, )It has these keys: 1bool(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)