3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $ob = new stdClass(); $derp = "test"; $ob->{$derp}->val = 'test'; print_r($ob);
Output for 5.4.0 - 7.1.0
Warning: Creating default object from empty value in /in/s7cte on line 5 stdClass Object ( [test] => stdClass Object ( [val] => test ) )
Output for 4.3.0 - 5.3.29
stdClass Object ( [test] => stdClass Object ( [val] => test ) )