3v4l.org

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