3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump( (object) array( 'x' ) ); var_dump( get_object_vars( (object) array( 'x' ) ) );
based on vojRR
Output for 7.2.0
object(stdClass)#1 (1) { ["0"]=> string(1) "x" } array(1) { [0]=> string(1) "x" }
Output for 7.0.0 - 7.1.10
object(stdClass)#1 (1) { [0]=> string(1) "x" } array(1) { [0]=> string(1) "x" }
Output for 5.3.21 - 5.6.28
object(stdClass)#1 (1) { [0]=> string(1) "x" } array(0) { }