3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php print_r((object) array("" => "foo"));
Output for 4.3.0 - 4.4.9, 5.1.0 - 5.1.6, 5.6.21 - 5.6.28, 7.0.6 - 7.1.0
stdClass Object ( [] => foo )
Output for 5.2.0 - 5.6.20, 7.0.0 - 7.0.5
stdClass Object ( [ Notice: Illegal member variable name in /in/cGs0T on line 2 ] => foo )
Output for 5.0.0 - 5.0.5
stdClass Object ( [:private] => foo )