3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $hash->{"123"} = "123"; $hash->apple = "pear"; var_dump($hash); echo $hash->{'123'};
based on 8R104
Output for 5.4.0 - 7.1.0
Warning: Creating default object from empty value in /in/tSmWN on line 2 object(stdClass)#1 (2) { ["123"]=> string(3) "123" ["apple"]=> string(4) "pear" } 123
Output for 5.0.0 - 5.3.29
Strict Standards: Creating default object from empty value in /in/tSmWN on line 2 object(stdClass)#1 (2) { ["123"]=> string(3) "123" ["apple"]=> string(4) "pear" } 123
Output for 4.3.0 - 4.4.9
object(stdClass)(2) { [123]=> string(3) "123" ["apple"]=> string(4) "pear" } 123