|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-06-15 08:47 UTC] jani@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 08 21:00:02 2025 UTC |
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