Re: bool values and increment operators?

From: Date: Mon, 25 Mar 2019 15:25:16 +0000
Subject: Re: bool values and increment operators?
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-104937@lists.php.net to get a copy of this message
On Mon, 25 Mar 2019 at 15:03, Christian Schneider <cschneid@cschneid.com> wrote: > The documentation has a highlighted box stating > "Note: The increment/decrement operators only affect numbers and strings. > Arrays, objects and resources are not affected. Decrementing NULL values > has no effect too, but incrementing them results in 1." > The NULL part of that has always baffled me. Why should ++ not be symmetrical with -- here? In general, documenting what we currently do is great, but is separate from agreeing that it's what we *should* do. Regards, -- Rowan Collins [IMSoP]

« previous php.internals (#104937) next »