<?php interface I { public function go(iterable $x): void; } final class Test implements I { public function go(iterable|Generator $x): void { echo 'It\'s work!'; } } (new Test())->go([]); echo "\n"; (new Test())->go((static fn() => yield 1)());
You have javascript disabled. You will not be able to edit any code.