Get your own PHP server Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<?php
function countTo3() {
  yield "1";
  yield "2";
  yield "3";
}
foreach(countTo3() as $number) {
  echo $number;
  echo "<br>";
}
?>
 
</body>
</html>
1
2
3