Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

syntax

php

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.

like image 368
Rene Terstegen Avatar asked Jun 29 '11 07:06

Rene Terstegen


1 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 ;)

like image 64
KingCrunch Avatar answered Oct 09 '22 13:10

KingCrunch