<?php function gen() { for($i=1; $i<10; $i++) yield $i; } $i = gen(); print_r($i); echo "foreaching...\n"; foreach($i as $x) { print_r($i); echo $x . "\n"; }
You have javascript disabled. You will not be able to edit any code.