You say that goto is unstructured and that break with a label offers a better alternative. But, let's face it, doesn't using break with a label, which can result in the removal of many lines of code and nesting levels per break, also destructure the code?
Answer: A quick answer would be: yes! However, in cases where a drastic change in program flow is needed, using break with a label still maintains some structure. The goto statement has none!
The above is the detailed content of Ask the expert - Break and goto. For more information, please follow other related articles on the PHP Chinese website!