Bug #3727: <= test change on a string used as a loop index changes its size

From: Date: Sun, 05 Mar 2000 00:22:40 +0000
Subject: Bug #3727: <= test change on a string used as a loop index changes its size
Groups: php.dev 
Request: Send a blank email to php-dev+get-16396@lists.php.net to get a copy of this message
From: tesio@easynet.fr Operating system: Linux RedHat 5.2 2.0.36 PHP version: 3.0.12 PHP Bug Type: Misbehaving function Bug description: &lt;= test change on a string used as a loop index changes its size for ($a="A";$a<"Z";$a++) { echo $a; } ABCDEFGHIJKLMNOPQRSTUVWXY When you replace < with <= the variable is now on two characters : for ($a="A";$a<="Z";$a++) { echo $a; } ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAG ... YZ Sorry I can't test in in the newest version, I don't own the machine, there is nothing in the ChangeLog about this problem. live phpinfo here if needed : http://www.onesite.org/phpinfo.php3 Regards, Alain Tesio

« previous php.dev (#16396) next »