3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class X { } $empty =''; $x = new X(); $x->{$empty} = 1;
Output for 7.1.0 - 7.3.0rc6
Output for 7.0.0 - 7.0.20
Fatal error: Uncaught Error: Cannot access empty property in /in/jCZ5F:6 Stack trace: #0 {main} thrown in /in/jCZ5F on line 6
Process exited with code 255.
Output for 5.3.7 - 5.6.28
Fatal error: Cannot access empty property in /in/jCZ5F on line 6
Process exited with code 255.