Re: Re: ++ BUG?? (fwd)

From: Date: Sun, 26 Nov 2000 19:45:15 +0000
Subject: Re: Re: ++ BUG?? (fwd)
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-39157@lists.php.net to get a copy of this message
On Sun, 26 Nov 2000, Stanislav Malyshev wrote: > IV>> are happening at the wrong time. They seem to be happening before the > IV>> assignment instead of after the whole statement. Pre operations work as > > I do not get this. Why should ++ operator happen _after_ the > assignment? Expression is evaluated as expression, and it does not know > anything on the following assignment. $idx = ($idx++)%2 should leave $idx > as 0. > The PHP manual states "C-style ... operators". C only does the post(inc|dec) at the end of the statement, not after the expression. -- Ignacio Vazquez-Abrams <ignacio@openservices.net>

« previous php.dev (#39157) next »