Re: Labeled Break (nothing at all whatsoever to do withGOTO)

From: Date: Wed, 30 Nov 2005 21:20:44 +0000
Subject: Re: Labeled Break (nothing at all whatsoever to do withGOTO)
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-20909@lists.php.net to get a copy of this message
devils advocate: what happens when I want to place a 'goto' label just before a while or foreach loop (upon which I haven't put a label)? I ask because I assume that the following 2 statements should be identical no:?
I think there would be no such thing as a 'goto' or 'break' label. There would be just labels. You could use them with 'goto' and/or 'break' together: goto LABEL: ... LABEL:while (cond) { if (cond)
    break LABEL;
}

« previous php.internals (#20909) next »