I have to maintain a code, and came up with this:
for (;;) {
//code
}
What would it do? I couldn't find documentation about it.
In a hunch I think it runs only once... but that would be useless...
I have to maintain a code, and came up with this:
for (;;) {
//code
}
What would it do? I couldn't find documentation about it.
In a hunch I think it runs only once... but that would be useless...
it is an infinite loop, similar in function as:
while(true)
{
}
Your code sample is an infinite loop. To terminate, the omitted code (//code
) must exit the loop or the entire PHP script.
It's a for loop without initialization parameters, no breaking conditions and no increments/decrements/whatever on each iteration - think of it like for (nothing; nothing; nothing)
.
Unless you break it from the inside, it's going to run forever.
For embedded code it is the main loop that does all the other sub process in a super loop scheme.