3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php abstract class TestAbstract { public static function test() { echo static::class; } } class Test extends TestAbstract { public static function test() { parent::test(); } } Test::test();
Output for 7.0.0 - 7.1.6
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Test has a deprecated constructor in /in/3FI2n on line 7 Fatal error: Constructor Test::test() cannot be static in /in/3FI2n on line 7
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: Constructor Test::test() cannot be static in /in/3FI2n:8 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Constructor Test::test() cannot be static in /in/3FI2n on line 9
Process exited with code 255.