Bug #1452: $i = $i++ fails
| From: | jmorrow at alum dot mit dot edu | Date: | Tue, 25 May 1999 22:19:06 +0000 |
| Subject: | Bug #1452: $i = $i++ fails | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-5996@lists.php.net to get a copy of this message | ||
From: jmorrow@alum.mit.edu
Operating system: RedHat Linux 5.2
PHP version: 3.0.7
PHP Bug Type: Misbehaving function
Bug description: $i = $i++ fails
The following doesn't work:
$i = 0;
while($i < 50) {
print $i."\n";
$i = $i++;
}
$i remains stuck on zero. The identical construct in C:
int i;
i = 0;
while(i < 50) {
printf("%d\n",i);
i = i++;
}
has the expected behavior (it prints 0 to 49). I know that this is a very obscure case, but I still
think it's a bug.
My config line:
./configure --with-apache=../apache_1.3.3 --with-gd=/usr/local --with-mysql=/usr/local/mysql
--with-ldap=/usr/local --enable-debug=no --enable-track-vars=yes
--
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