RE: [PHP] Simple: Whats wrong with this?

From: Date: Thu, 18 Mar 2004 17:03:34 +0000
Subject: RE: [PHP] Simple: Whats wrong with this?
Groups: php.general 
Request: Send a blank email to php-general+get-180858@lists.php.net to get a copy of this message
Ford, Mike <LSS> on Thursday, March 18, 2004 5:02 AM said: > Not quite -- the increment is performed immediately after the access > -- in fact, as part of the same operation. So: > > $x = 3; > $y = ($x++ * 2) + $x; > > is likely to give you $y==10, not 9. i see. good example. chris.

« previous php.general (#180858) next »