3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface I { public function phpyh(string $x): iterable; } abstract class A implements I { abstract public function phpyh(int|string $x): array|\Generator; } interface I2 { public function phpyh(float $x, string $y): array; } final class B extends A implements I, I2 { public function phpyh(int|string|float $x, string $y = 'С 8 марта!'): array { return []; } } new B();
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7

preferences:
94.17 ms | 402 KiB | 91 Q