3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Foo { public function bar(string $stuff): Generator; } class Baz { public function bar(string $stuff): Generator { yield $stuff; } } $baz = new Baz; $g = $baz->bar("Hello PHP!"); foreach ($g as $value) { var_dump($value); }

preferences:
53.55 ms | 1532 KiB | 5 Q