php2go/fixtures/0002-loops.php

22 lines
255 B
PHP
Raw Normal View History

2020-04-05 04:35:44 +00:00
<?php
// Different types of loop statement
for($i = 0; $i < 3; ++$i) {
foreach($foo as $k => $v) {
}
foreach($foo2 as $v2) {
}
while(true) {
}
do {
} while (true);
}
// Loop with no separate body statement
while (true) echo "hello";