#48545 [NEW]: Looping 'A' to 'Z' does not reach 'Z' and permutations are generated
| From: | robccsilva at gmail dot com | Date: | Sat, 13 Jun 2009 16:34:42 +0000 |
| Subject: | #48545 [NEW]: Looping 'A' to 'Z' does not reach 'Z' and permutations are generated | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-138263@lists.php.net to get a copy of this message | ||
From: robccsilva at gmail dot com
Operating system: Windows XP
PHP version: 5.2.9
PHP Bug Type: Variables related
Bug description: Looping 'A' to 'Z' does not reach 'Z' and
permutations are generated
Description:
------------
Trying to write:
ABCDEFGHIJKLMNOPQRSTUVWXYZ
1.
ABCDEFGHIJKLMNOPQRSTUVWXY
2.
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAF...SYTYUYVYWYXYYYZ
3.
ABC...ZZY
Reproduce code:
---------------
<html>
<body>
<?php
echo "Hello World!<br /><br />\r\n";
echo "On this test case I will write the letters A-Z the easy way!<br
/>\r\n";
echo "If you the result of each test, you the man!<br />\r\n";
echo "<br /><br />\r\n";
echo "On this small test you might 'crash' your browser, run at your risk!
;)<br />\r\n";
echo "<br /><br />\r\n";
echo "1. I think as a noob, so the first script should get me to the 'Z'
as follows:<br />\r\n";
for ($letter = 'A'; $letter < 'Z'; $letter++) { echo $letter; }
echo "<br /><br />\r\n";
echo "2. As a noobster, I want to reach 'Z' as follows:<br />\r\n";
for ($letter = 'A'; $letter <= 'Z'; $letter++) { echo $letter; }
echo "<br /><br />\r\n";
echo "3. Being a major noob, decided to reach 'Z' as follows:<br />\r\n";
for ($letter = 'A'; $letter < 'Z'+1; $letter++) { echo $letter; }
?>
</body>
</html>
Expected result:
----------------
Write ABCDEFGHIJKLMNOPQRSTUVWXYZ
--
Edit bug report at http://bugs.php.net/?id=48545&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48545&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48545&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48545&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=48545&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48545&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=48545&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=48545&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=48545&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=48545&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=48545&r=support
Expected behavior: http://bugs.php.net/fix.php?id=48545&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=48545&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=48545&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=48545&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48545&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48545&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=48545&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=48545&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=48545&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=48545&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=48545&r=mysqlcfg