Home » Php » What is the "break/continue $var syntax" (will be removed in PHP 5.4)?

What is the "break/continue $var syntax" (will be removed in PHP 5.4)?

Posted by: admin April 23, 2020 Leave a comment

Questions:

I’m looking at the alpha 1 news about PHP 5.4 and find some things that are removed.

In that list they talk about break/continue $var syntax.

How to&Answers:

I assume, that this one is meant

break $c;
continue $c;

break and continue accepts a number, that specify the number of nested loops, that should be breaked up, or continued. Have a look at the example at the manual.

However, it seems, that break and continue are not usable with variables anymore. In my personal experience, this will affect .. nobody 😉