3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public static $a = "Hello"; public $b = "World"; } $a = new A(); echo $a::$a; echo $a::$b; A::$a = "Nino"; $b = new A(); echo "\n\n"; echo $b::$a; echo $b::$b;
based on Sfg1R
Output for 7.0.0 - 7.2.0
Hello Fatal error: Uncaught Error: Access to undeclared static property: A::$b in /in/8tAVg:11 Stack trace: #0 {main} thrown in /in/8tAVg on line 11
Process exited with code 255.
Output for 5.3.18 - 5.6.28
Hello Fatal error: Access to undeclared static property: A::$b in /in/8tAVg on line 11
Process exited with code 255.