运行 ❯
获取您
自己的 PHP
服务器
×
更改方向
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <?php $i = 8; do { echo $i; $i++; } while ($i < 6); ?> <p>As you can see, the code is executed once, even if the condition is never true.</p> </body> </html>
8
正如你所见,代码执行了一次,即使条件永远不为真。