3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array(0 => 'foo', '1' => 'bar', '2' => 'baz', 'somestringkey' => 'blah'); var_dump($array); var_dump(array_keys($array));
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(4) { [0]=> string(3) "foo" [1]=> string(3) "bar" [2]=> string(3) "baz" ["somestringkey"]=> string(4) "blah" } array(4) { [0]=> int(0) [1]=> int(1) [2]=> int(2) [3]=> string(13) "somestringkey" }