3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x=array(1=>'t'); var_dump($x); var_dump((object)$x); var_dump((array)(object)$x);
Output for 5.0.0 - 7.1.0
array(1) { [1]=> string(1) "t" } object(stdClass)#1 (1) { [1]=> string(1) "t" } array(1) { [1]=> string(1) "t" }
Output for 4.3.0 - 4.4.9
array(1) { [1]=> string(1) "t" } object(stdClass)(1) { [1]=> string(1) "t" } array(1) { [1]=> string(1) "t" }