3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = array('9876' => 54321, 999 => 112); var_dump($x); var_dump(gettype(key($x))); var_dump($x[key($x)]); var_dump($x[(string)key($x)]);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
array(2) { [9876]=> int(54321) [999]=> int(112) } string(7) "integer" int(54321) int(54321)