Re: [STANDARDS] switch statement and multiple default cases

[email protected] (Andrea Faulds)
Newsgroups php.standards
Message-ID <[email protected]>
On 4 Aug 2014, at 10:49, Robert Stoll <[email protected]> wrote:

> The spec states "There must be at most one default label." [1] which is
> surely the right way to go IMO but not even the PHP implementation (5.5.9)
> behaves like this and the following is perfectly valid:

> Should I report a bug?

A bug in php.net PHP? Sure, there’s no good reason to allow both. In the standard? No, not really. It’s only because of implementation bugginess that this is even ‘permitted’.

--
Andrea Faulds
http://ajf.me/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.