3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = new StdClass(); $a->{'0'} = 'a'; $a->{'1'} = 'a'; $a = (array)$a; var_dump($a);
Output for 4.3.0 - 4.4.9, 7.2.0 - 7.2.6
array(2) { [0]=> string(1) "a" [1]=> string(1) "a" }
Output for 5.0.0 - 7.1.20
array(2) { ["0"]=> string(1) "a" ["1"]=> string(1) "a" }