3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { static $a = 5; function f() { echo static::a; } } $a = new A(); $a->f();
based on vLQY4
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Undefined class constant 'a' in /in/P0NEX:9 Stack trace: #0 /in/P0NEX(14): A->f() #1 {main} thrown in /in/P0NEX on line 9
Process exited with code 255.
Output for 5.3.21 - 5.6.28
Fatal error: Undefined class constant 'a' in /in/P0NEX on line 9
Process exited with code 255.