3v4l.org

run code in 300+ PHP versions simultaneously
<?php function generator(): iterable { yield 1; yield 2; yield 3; } $iterable = generator(); var_dump($iterable); var_dump(array(...$iterable));

preferences:
64.17 ms | 404 KiB | 5 Q