3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $object = new StdClass(); $object->{'1'} = 'test'; $array = (array) $object; var_dump($array);
Output for 5.0.0 - 7.1.7
array(1) { ["1"]=> string(4) "test" }
Output for 4.3.0 - 4.4.9
array(1) { [1]=> string(4) "test" }