Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76467 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2321 invoked from network); 13 Aug 2014 09:41:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Aug 2014 09:41:54 -0000 Authentication-Results: pb1.pair.com smtp.mail=ajf@ajf.me; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=ajf@ajf.me; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ajf.me designates 192.64.116.207 as permitted sender) X-PHP-List-Original-Sender: ajf@ajf.me X-Host-Fingerprint: 192.64.116.207 imap2-2.ox.privateemail.com Received: from [192.64.116.207] ([192.64.116.207:43846] helo=imap2-2.ox.privateemail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E0/60-33745-1E23BE35 for ; Wed, 13 Aug 2014 05:41:54 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.privateemail.com (Postfix) with ESMTP id 6E9D18C0075; Wed, 13 Aug 2014 05:42:35 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at imap2.ox.privateemail.com Received: from mail.privateemail.com ([127.0.0.1]) by localhost (imap2.ox.privateemail.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id JdgLrh-ofHCp; Wed, 13 Aug 2014 05:42:35 -0400 (EDT) Received: from [192.168.0.2] (05439dda.skybroadband.com [5.67.157.218]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.privateemail.com (Postfix) with ESMTPSA id EFD7F8C007D; Wed, 13 Aug 2014 05:42:32 -0400 (EDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) In-Reply-To: Date: Wed, 13 Aug 2014 10:42:30 +0100 Cc: Sara Golemon , PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <942D2AF6-BDC2-4214-BD58-4B5945C28CE3@ajf.me> References: To: Ferenc Kovacs , James X-Mailer: Apple Mail (2.1878.6) Subject: Re: [PHP-DEV] [RFC] Disallow multiple default blocks in a single switch statement From: ajf@ajf.me (Andrea Faulds) Hi! On 13 Aug 2014, at 08:47, Ferenc Kovacs wrote: > 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. This isn=92t really a BC break. Multiple default blocks didn=92t = actually work anyway, we just silently ignored extra ones. On 13 Aug 2014, at 09:13, James wrote: > I entirely believe this behavior is weird and should be removed. = However, > breaking backwards > compatibility in a minor release because the incomplete spec says so = is > kind of odd. A BC break > is a BC break, which doesn't belong in a minor revision. It isn=92t a BC break that will affect anyone. It fixes a parser bug. > This has been known to at least one person for many years if 034.phpt = is to > be believed. Just because it=92s tested doesn=92t mean anyone relies on it. We have = plenty of tests which ensure PHP contains bugs and will error if they = don=92t. > I could see > where people would use it - there are reasons to, even if they are = poor in > choice to do so. How, exactly, could there ever be a use for having multiple default: = sections and ignoring all but one? This =93feature=94 is completely and = utterly useless, and I=92ll eat my hat if anyone intentionally relied on = it. Thanks!! -- Andrea Faulds http://ajf.me/