3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait ExpectsFooMethod { abstract public function foo(): string; } trait ProvidesFooMethod { use ExpectsFooMethod; public function foo(): string {} } final readonly class FooMethodImpl { use ProvidesFooMethod; }
Output for 8.2.28 - 8.2.29, 8.3.5 - 8.3.26, 8.4.5 - 8.4.13

preferences:
50.1 ms | 406 KiB | 5 Q