RE: [PHP-DEV] [RFC] Disallow multiple default blocks in a single switch statement

From: Date: Wed, 13 Aug 2014 10:34:59 +0000
Subject: RE: [PHP-DEV] [RFC] Disallow multiple default blocks in a single switch statement
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-76473@lists.php.net to get a copy of this message
From: Andrea Faulds [mailto:ajf@ajf.me] Sent: Wednesday, August 13, 2014 11:43 AM > > Hi! > > On 13 Aug 2014, at 08:47, Ferenc Kovacs <tyra3l@gmail.com> 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’t really a BC break. Multiple default blocks didn’t actually > work anyway, we just silently ignored extra ones. > > On 13 Aug 2014, at 09:13, James <james@notjam.es> 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’t a BC break that will affect anyone. It fixes a parser bug. > If somebody unintentionally has multiple default blocks in his code and PHP is upgraded, he will get a parser error and his application will be broken. This definitely IS a BC break. But one could argue if this BC break will maybe help someone to find bugs in his code ;-)

« previous php.internals (#76473) next »