3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $hash->{"apple"} = "red"; var_dump($hash); echo $hash->apple;
based on QNsDe
Output for 5.4.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
Warning: Creating default object from empty value in /in/RUDfm on line 2 object(stdClass)#1 (1) { ["apple"]=> string(3) "red" } red
Output for 5.0.0 - 5.3.29
Strict Standards: Creating default object from empty value in /in/RUDfm on line 2 object(stdClass)#1 (1) { ["apple"]=> string(3) "red" } red
Output for 4.3.0 - 4.4.9
object(stdClass)(1) { ["apple"]=> string(3) "red" } red