3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $object = new stdClass(); $object->{'1'} = 'one'; $array = (array) $object; var_dump($array); var_dump(key($array));
based on RHYm3
Output for 7.2.0
array(1) { [1]=> string(3) "one" } int(1)
Output for 5.3.19 - 7.1.10
array(1) { ["1"]=> string(3) "one" } string(1) "1"