Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76461 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84999 invoked from network); 13 Aug 2014 07:46:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Aug 2014 07:46:59 -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.192.42 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.192.42 mail-qg0-f42.google.com Received: from [209.85.192.42] ([209.85.192.42:43163] helo=mail-qg0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 07/11-00877-0F71BE35 for ; Wed, 13 Aug 2014 03:46:56 -0400 Received: by mail-qg0-f42.google.com with SMTP id j5so10651629qga.1 for ; Wed, 13 Aug 2014 00:47:38 -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=MNY2BeGRFI4Ql6E5Ft1jU2/T71c6/slEZGVg4bhEXdQ=; b=JitVg7vzMPGsNpMGfeoWHkLE6AnApn4R9gkIltcUI4Plex5ZABVqIhL56g9YGvnYcI 6wYZkLQsRetJGHk5W4SNUngkdUqcHp8vnpdrlK84dEVclX6pAhOwS25waqQ9Q1Tm7Vuw XriH93ED0B53QPUtpSSu/tnxlxrAuNQT5s5uig2FyQuRQ6gHpGLBYpdIaJFDUhGIE2lC ObQ9jCSObqGTVBCCsA+Aa3jD46NLzIvb4BRuKN3ZpqztMqpRJgkImBO7DCCknA7FPU/H XLdULR9BIH1B9iuPqcTDPWlMeGHb6JtSr7zpdP8Fnf4I2UmOOBP6GtaD9e1iDHIA8bDA 9HFA== MIME-Version: 1.0 X-Received: by 10.229.212.194 with SMTP id gt2mr4288872qcb.6.1407916058186; Wed, 13 Aug 2014 00:47:38 -0700 (PDT) Received: by 10.140.102.111 with HTTP; Wed, 13 Aug 2014 00:47:38 -0700 (PDT) In-Reply-To: References: Date: Wed, 13 Aug 2014 09:47:38 +0200 Message-ID: To: Sara Golemon Cc: PHP internals Content-Type: multipart/alternative; boundary=001a11339280859c7c05007e007c Subject: Re: [PHP-DEV] [RFC] Disallow multiple default blocks in a single switch statement From: tyra3l@gmail.com (Ferenc Kovacs) --001a11339280859c7c05007e007c Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Aug 6, 2014 at 6:38 AM, Sara Golemon wrote: > https://wiki.php.net/rfc/switch.default.multiple > > 'Cause this code is silly (even if it had case blocks), but we allow it: > > switch ($expr) { > default: > notExecuted(); > break; > default: > executed(); > } > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > Hi, sorry to jump in this late, but I'm not sure that it is a good idea to only reject the multiple default blocks but keep the ability to have the same case multiple times: http://3v4l.org/eZdPU in this regard I think the current status is more consistent as it would after merging this patch. and I also think that this isn't an important enough issue to warrant a BC break (albeit this is the better kind of BC: probably doesn't effect too many people, and they will be clearly notified about the error at compile time) so I voted no based on this two thing. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --001a11339280859c7c05007e007c--