ID:               42949
 Comment by:       felipensp at gmail dot com
 Reported By:      phpbug at fint dot org
 Status:           Open
 Bug Type:         Arrays related
 Operating System: Linux
 PHP Version:      5.2.4
 New Comment:

The order is A-Z, a-z.

<?php

$init = ord('A');
$end  = ord('z');

printf("Init.: %d | End.: %d\n", $init, $end);

for ($i = $init; $i <= $end; $i++) {
    print chr($i);
}
print "\n";

?>


Previous Comments:
------------------------------------------------------------------------

[2007-10-12 13:49:56] phpbug at fint dot org

Description:
------------
range('a', 'Z') gives random junk

Reproduce code:
---------------
<?php
foreach (range('a', 'Z') as $letter) {
   echo $letter;
   }
?>


Expected result:
----------------
a-z and A-Z (wishful thinking?) 

I am trying to recreate Perl's "@a=('a'..'z', 'A'..'Z');"

Actual result:
--------------
a`_^]\[Z



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=42949&edit=1

Reply via email to