Bug #1452 Updated: $i = $i++ fails

From: Date: Tue, 25 May 1999 22:31:22 +0000
Subject: Bug #1452 Updated: $i = $i++ fails
Groups: php.dev 
Request: Send a blank email to php-dev+get-5997@lists.php.net to get a copy of this message
ID: 1452 Updated by: zeev Reported By: jmorrow@alum.mit.edu Status: Closed Bug Type: Misbehaving function Assigned To: Comments: In fact, if that loop hangs for you, than it succeeds doing what it's supposed to do. $i=$i++ is equivalent to an empty statement. Consult the documentation regarding what post-increment is to understand why. You could do what you want by choosing any of the following: $i = ++$i; or $i++; or ++$i; The last one being the quickest of them all. Full Bug description available at: http://bugs.php.net/?id=1452 -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#5997) next »