On Thu, Jun 14, 2018 at 11:57 AM, Thomas Bley <ma...@thomasbley.de> wrote:
> for simplicity I would use an extra parameter to have a strict comparison 
> (similar to the extra parameter in in_array()):
>
> switch ($a, true) { // strict comparison
> switch ($a) { // loose comparison
>
I instinctively recoil from boolean arguments as they tend to be
opaque at a glance, but perhaps:

switch ($a, ===) {...}

Would both be more apparent as to its meaning and leave the door open
for other uses.  Though at that point, tbqh, I think `switch ($a) use
(===) {...}` gives better visual isolation.

-Sara

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

Reply via email to