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