Ferenc Kovacs wrote (on 13/08/2014):
agree, and I thought about mentioning that, but I left that out, because I'm not proposing to remove that ability (and I see more use-cases for that as mentioned in my previous email) but stating that this patch would make an arbitrary distinction between the normal and the default cases.

I'm not sure I agree that it's arbitrary. Having a switch with two "default" clauses is like having an if with two "else" clauses; specifying two case labels which can be true at the same time is like having two "elseif" clauses chained together that can both be true at the same time. One is clearly an error; the other is just poorly written logic, and you can't make the parser outlaw every instance of poor logic.

--
Rowan Collins
[IMSoP]



--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to