while, until
while (...) {...}
until (...) {...}
Repeats executing statement or block after function name while parameter is true (for while) or false (for until).
Indirect parameter passing is disabled
None
1
No. | Type | Description |
---|---|---|
1 input |
boolean | Boolean expression If the expression is true, then the following statement or block will be executed. Otherwise, it will be skipped. Default value: n/a |
none
a[] = 0;
while ( a[]++ < 10) print( a[], ' ' );
until ( a[]-- <= 5) print( a[], ' ' );
echo;
1 2 3 4 5 6 7 8 9 10 10 9 8 7 6 5