Re: Re: [VOTE] [RFC] Alphanumeric Decrement
| From: | Rouven Weßling | Date: | Tue, 28 Jan 2014 09:19:43 +0000 |
| Subject: | Re: Re: [VOTE] [RFC] Alphanumeric Decrement | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-71661@lists.php.net to get a copy of this message | ||
> On 28.01.2014, at 07:12, Tjerk Meesters <tjerk.meesters@gmail.com> wrote:
>
> Btw, doing flip/flop can be done with
$val = (bool)1 - $val; as
> well :)
There's an even easier way:
$val = !$val;
Personally I don't see a need to support increment/decrement for booleans. If at all they
should be treated like they were cast to an int first.
Best regards
Rouven