3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { static $a = 5; function f() { echo $this->a; } } $a = new A(); $a->f();
based on u5iCA
Output for 7.0.0 - 7.2.0
Notice: Accessing static property A::$a as non static in /in/vLQY4 on line 9 Notice: Undefined property: A::$a in /in/vLQY4 on line 9
Output for 5.3.21 - 5.6.28
Strict Standards: Accessing static property A::$a as non static in /in/vLQY4 on line 9 Notice: Undefined property: A::$a in /in/vLQY4 on line 9