3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Test { public function getIndex(): string; } class Index implements Test { public static function getIndex(): string { return 'test'; } }
Output for 8.5.0 - 8.5.3
Fatal error: Cannot make non static method Test::getIndex() static in class Index in /in/nfFFJ on line 10 Stack trace: #0 {main}
Process exited with code 255.
Output for 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18
Fatal error: Cannot make non static method Test::getIndex() static in class Index in /in/nfFFJ on line 10
Process exited with code 255.

preferences:
53.52 ms | 850 KiB | 4 Q