執行 ❯
獲取您
自己的 PHP
伺服器
×
更改方向
更改主題,深色/淺色
前往 Spaces
<!DOCTYPE html> <html> <body> <?php function countTo4() { yield from [1, 2, 3]; yield 4; } foreach(countTo4() as $number) { echo $number; echo "<br>"; } ?> </body> </html>
1
2
3
4