On Wed, Aug 6, 2014 at 6:38 AM, Sara Golemon <poll...@php.net> 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,

I think dropping this behavior is a good idea, but I'm confused by the
reasoning related to the langspec.
This rfc targets php.next (which is a safe move as this has BC break albeit
would require some questionable code), but the langspec was agreed to be
based on 5.6 and document how that works.
So even if we accept this rfc, and remove the multiple default case,
wouldn't we still need to document the current behavior in the spec (maybe
mentioning that it will go away in php-net)?

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu

Reply via email to