3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function bar() { echo "hi\n"; } } Foo::bar();
Output for 8.0.0
Fatal error: Uncaught Error: Non-static method Foo::bar() cannot be called statically in /in/P0ORv:9 Stack trace: #0 {main} thrown in /in/P0ORv on line 9
Process exited with code 255.
Output for 7.2.0 - 7.2.34, 7.3.0 - 7.3.23, 7.4.0 - 7.4.13
Deprecated: Non-static method Foo::bar() should not be called statically in /in/P0ORv on line 9 hi