Infinite Loops : While loop « Statement « PHP
- PHP
- Statement
- While loop
Infinite Loops
<?php
while(1) {
print "In loop!\n";
}
?>
As "1" also evaluates to true, that loop will continue on forever.
<?php
for (;;) {
print "In loop!\n";
}
?>
Related examples in the same category