3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $var = null; var_dump($var); $var->prop = 'jojojo'; var_dump($var);
Output for 5.4.0 - 7.1.0
NULL Warning: Creating default object from empty value in /in/DAU0I on line 5 object(stdClass)#1 (1) { ["prop"]=> string(6) "jojojo" }
Output for 5.0.0 - 5.3.29
NULL Strict Standards: Creating default object from empty value in /in/DAU0I on line 5 object(stdClass)#1 (1) { ["prop"]=> string(6) "jojojo" }
Output for 4.3.0 - 4.4.9
NULL object(stdClass)(1) { ["prop"]=> string(6) "jojojo" }