Lambda and colon in while statement for PHP?

后端 未结 3 1528
北海茫月
北海茫月 2021-01-12 14:04

What does the below code mean (it\'s a lambda in the while-statement, then a colon after)? Coming from JavaScript, I have no idea what that means or even how to search for t

3条回答
  •  攒了一身酷
    2021-01-12 14:36

    This is a less-common while structure:

    while (condition):
        doSomething();
    endwhile;
    

    This is not how things are traditionally done, but it is valid syntax. See while loop syntax for more details, as well as alternative control syntax.

提交回复
热议问题