<?php function naturalIntegers() { $i = 0; while (true) { yield $i++; } } foreach(naturalIntegers() as $i) { if ($i > 10) { break; } print $i.PHP_EOL; } print "finished\n";
You have javascript disabled. You will not be able to edit any code.