3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public static $var = "Hello"; public function output() { $a = "var"; echo($this->{$a}); } } $a = new A(); $a->output();
based on LMqtX
Output for 7.0.0 - 7.2.0
Notice: Accessing static property A::$var as non static in /in/mi7FM on line 7 Notice: Undefined property: A::$var in /in/mi7FM on line 7
Output for 5.3.17 - 5.6.21
Strict Standards: Accessing static property A::$var as non static in /in/mi7FM on line 7 Notice: Undefined property: A::$var in /in/mi7FM on line 7