3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Qwe { #public ${''} = 20; public function __construct(){ echo $this->{''}.PHP_EOL; } } ${''}=10; echo ${''}.PHP_EOL; // 10 echo ${null}.PHP_EOL; // 10 $b = new Qwe;
Output for 7.1.0 - 7.2.6
10 10 Notice: Undefined property: Qwe::$ in /in/lSRbM on line 8
Output for 7.0.0 - 7.0.20
10 10 Fatal error: Uncaught Error: Cannot access empty property in /in/lSRbM:8 Stack trace: #0 /in/lSRbM(17): Qwe->__construct() #1 {main} thrown in /in/lSRbM on line 8
Process exited with code 255.
Output for hhvm-3.15.4
10 10 Fatal error: Uncaught Error: Cannot access empty property in /in/lSRbM:8 Stack trace: #0 /in/lSRbM(17): Qwe->__construct() #1 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
10 10 Fatal error: Cannot access empty property in /in/lSRbM on line 8
Process exited with code 255.