3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar() {} } Foo::bar();
Output for 8.0.0
Fatal error: Uncaught Error: Non-static method Foo::bar() cannot be called statically in /in/KZAsn:5 Stack trace: #0 {main} thrown in /in/KZAsn on line 5
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/KZAsn on line 5