3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Object { function object() { return 'Object and object' . PHP_EOL; } } echo Object::object();
based on sMd4Z
Output for 7.2.0
Fatal error: Cannot use 'Object' as class name as it is reserved in /in/cA6sJ on line 2
Process exited with code 255.
Output for 7.0.0 - 7.1.10
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Object has a deprecated constructor in /in/cA6sJ on line 2 Fatal error: Uncaught Error: Non-static method Object::object() cannot be called statically in /in/cA6sJ:9 Stack trace: #0 {main} thrown in /in/cA6sJ on line 9
Process exited with code 255.
Output for 5.3.18 - 5.6.28
Fatal error: Non-static method Object::object() cannot be called statically in /in/cA6sJ on line 9
Process exited with code 255.