Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76485 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42467 invoked from network); 13 Aug 2014 13:50:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Aug 2014 13:50:31 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.172 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.216.172 mail-qc0-f172.google.com Received: from [209.85.216.172] ([209.85.216.172:61753] helo=mail-qc0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BF/B5-11625-62D6BE35 for ; Wed, 13 Aug 2014 09:50:30 -0400 Received: by mail-qc0-f172.google.com with SMTP id i8so4190374qcq.3 for ; Wed, 13 Aug 2014 06:50:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=QiZRozA8blo2mUv/m3KBSRGt8Kyne2IKLMbqS1tMd2g=; b=SPn4/lvA0oCw067hZzBEnGhCz//82kye0qKGxq1byoAlXvwESroprsPTkBL/6QukiX zy9TmrYXyPZvCjtyue0/XjbAwGL9ea/47RTrVx9WjvEkd86tbDrsp1JDTFSq18R10Z0q CIZYfFLwgiZX8OWDrDmBWqm2Op/1vdyV9ZVSt340TWOb78wJMtA4CdoUH0Ywj2xHw9kS iv0YKsC0IgsUPtW5gqTITbNzfpSLJnBHypYOQ4x+KeQ0cutNgfBAhSQZw+Gy1++bY6XB MPquPuRlEAKV6Ouw190AzXxf4wu8Wq/yd8ZzC/+Jjqv/YScMhlkPdp/0DU4QKf4M3CK4 iYaQ== MIME-Version: 1.0 X-Received: by 10.224.103.72 with SMTP id j8mr7341826qao.12.1407937827786; Wed, 13 Aug 2014 06:50:27 -0700 (PDT) Received: by 10.140.102.111 with HTTP; Wed, 13 Aug 2014 06:50:27 -0700 (PDT) In-Reply-To: <53EB6B3F.407@gmail.com> References: <53EB3C6A.5010106@gmail.com> <53EB59AD.6020100@gmail.com> <53EB6103.4090600@gmail.com> <53EB6B3F.407@gmail.com> Date: Wed, 13 Aug 2014 15:50:27 +0200 Message-ID: To: Rowan Collins Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a11c297a617eb4f05008312e8 Subject: Re: [PHP-DEV] [RFC] Disallow multiple default blocks in a single switch statement From: tyra3l@gmail.com (Ferenc Kovacs) --001a11c297a617eb4f05008312e8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Aug 13, 2014 at 3:42 PM, Rowan Collins wrote: > Ferenc Kovacs wrote (on 13/08/2014): > >> >> It is not selecting the first default, it just never needs to look >> for a default, because it has already found a matching case label. >> >> >> yes, and it continues the execution from the first matching case and >> correctly evaluates the following defaults, as default matches everythin= g, >> which imo should be the correct behavior. >> > > No, it does not "evaluate the following defaults"; it evaluates all > following code. Once a label has been selected, you can think of all > subsequent labels being removed from the code completely. > > duh, that was embarrassing, thanks for bearing with me until I realized that. :S --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --001a11c297a617eb4f05008312e8--