<?php function TestIterator(){ $tab = [1,2,3,4,5,6]; for($i = 0; $i < count($tab); $i++){ yield $tab[$i]; } } $r = TestIterator(); var_dump($r[0]);
You have javascript disabled. You will not be able to edit any code.