Re: Strict switch statements
| From: | Jordi Boggiano | Date: | Fri, 15 Jun 2018 13:48:13 +0000 |
| Subject: | Re: Strict switch statements | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-102275@lists.php.net to get a copy of this message | ||
On 15/06/2018 00:10, Stanislav Malyshev wrote:
With current tendency to move to more strict interpretation and a bit away from type juggling, I think it has its place. But I am not a big fan to putting === there, it looks weird. Maybe go a bit further and make the whole switch strict? strict switch ($a) { case FOO: case BAR: // both are strict === }Might I suggest a new strictwich ($a) { ... } keyword? It's much more appetizing. Apologies, Jordi -- Jordi Boggiano @seldaek - https://seld.be