- Output for 8.0.1 - 8.0.28, 8.1.0 - 8.1.17, 8.2.0 - 8.2.4
<?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();