PHP 4.0 Bug #7185: $count++ bug (does not increase value in some cases)

From: Date: Fri, 13 Oct 2000 15:03:27 +0000
Subject: PHP 4.0 Bug #7185: $count++ bug (does not increase value in some cases)
Groups: php.dev 
Request: Send a blank email to php-dev+get-34917@lists.php.net to get a copy of this message
From: madey@OpenBSD.pl Operating system: OpenBSD 2.7 (i386) PHP version: 4.0.3 PHP Bug Type: Scripting Engine problem Bug description: $count++ bug (does not increase value in some cases) <html> <body> PHP 4.x : When I set $count to "", $count++ doesn't work properly.<br> PHP 3.x : script works OK.<br> <br> Don't tell me that's OK ;) ... I'm perl programmer and I have some habits...<br> <br> Simple example of $count++ bug.<br> (it should print 7 lines in PHP 3.x, but in PHP 4.x it loops :( )<br> <br> <?php $row_count = "7"; $count = ""; $line = "0"; while ($count < $row_count) { print "Line " . $line++ . ", count : " . $count++ . "<br>\n"; } ?> </body> </html> -- Edit Bug report at: http://bugs.php.net/?id=7185&edit=1

« previous php.dev (#34917) next »