Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:20914 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84188 invoked by uid 1010); 30 Nov 2005 23:11:23 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 84165 invoked from network); 30 Nov 2005 23:11:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Nov 2005 23:11:23 -0000 X-Host-Fingerprint: 69.12.155.130 69-12-155-130.dsl.static.sonic.net Linux 2.4/2.6 Received: from ([69.12.155.130:4732] helo=pigeon.alphaweb.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 25/C5-14828-A913E834 for ; Wed, 30 Nov 2005 18:11:23 -0500 Received: from localhost ([127.0.0.1] helo=stumpy) by pigeon.alphaweb.net with smtp (Exim 4.10) id 1EhaJ7-0008G8-00; Wed, 30 Nov 2005 14:20:09 -0800 Message-ID: <008501c5f603$ba2e04c0$7d051fac@stumpy> To: "Jochem Maas" Cc: References: <2B.E1.14828.4130D834@pb1.pair.com> <000001c5f584$77823f80$e902a8c0@thinkpad> <002c01c5f5bf$f55e8c20$7d051fac@stumpy> <438DD0A3.6000908@iamjochem.com> Date: Wed, 30 Nov 2005 14:15:21 -0800 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Subject: Re: [PHP-DEV] Labeled Break (nothing at all whatsoever to do withGOTO) From: pollita@php.net ("Sara Golemon") > 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:? > > LABEL: while(1) { > /* ..etc */ > ?> > > LABEL: > while(1) { > /* ..etc */ > ?> > PHP's parser gives no importance to whitespace, so yes, these two are identical. In the dual-purpose vision I had for these labels, all labels would be usable as GOTO targets. Labels which are followed *immediately* by a break container construct (for, foreach, while, do-while, switch) would also be usable as break/continue targets. Note that in these example, goto LABEL; and continue lABEL; are *not* the same statement. Goto would restart state loops such as for() and foreach() from initial positions. -Sara