3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Test { public $property; public $nullProperty = null; } $t = new Test; var_dump($t->property); var_dump(Test::$property); var_dump($t->nullProperty); var_dump(Test::$nullProperty);
based on kZOOW
Output for 7.0.0 - 7.3.0beta1
NULL Fatal error: Uncaught Error: Access to undeclared static property: Test::$property in /in/UGgel:12 Stack trace: #0 {main} thrown in /in/UGgel on line 12
Process exited with code 255.
Output for hhvm-3.22.0
NULL Fatal error: Uncaught Error: Invalid static property access: Test::property in /in/UGgel:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
NULL Fatal error: Uncaught Error: Invalid static property access: Test::property in /in/UGgel:12 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
NULL Fatal error: Access to undeclared static property: Test::$property in /in/UGgel on line 12
Process exited with code 255.