5 ms·
I wanted to actually ask the same thing! I knew of continue but I never encountered such a scenario. It's a poor man's generator.
by bwaxxlo 11y ago
I wanted to actually ask the same thing! I knew of continue but I never encountered such a scenario. It's a poor man's generator.
- arcatek 11y agoIn other languages (such as PHP), the same thing can sometimes be achieved by using "break N" / "continue N", where N is the number of loop you wish to break/continue.
- mgkimsal 11y agoSpecifically in PHP, though, you can't (anymore) break a variable value. break $n; isn't valid since PHP 5.4