3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Foo { const FOO = 'hi'; public static function foo() { echo self::FOO; } } Foo::foo();
Output for 7.0.0 - 7.0.1
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Foo has a deprecated constructor in /in/RYdUt on line 3 Fatal error: Constructor Foo::foo() cannot be static in /in/RYdUt on line 3
Process exited with code 255.
Output for 5.3.21 - 5.6.16
Fatal error: Constructor Foo::foo() cannot be static in /in/RYdUt on line 11
Process exited with code 255.