Bug #51573 [Opn->Bgs]: ctype_alpha function
| From: | mike@php.net | Date: | Wed, 12 May 2010 13:51:27 +0000 |
| Subject: | Bug #51573 [Opn->Bgs]: ctype_alpha function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-150394@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51573&edit=1
ID: 51573
Updated by: mike@php.net
Reported by: mluster79 at yahoo dot com
Summary: ctype_alpha function
-Status: Open
+Status: Bogus
Type: Bug
Package: Strings related
Operating System: Windows XP
PHP Version: 5.2.13
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
If the argument is a integer, it is treated as an ascii code.
Previous Comments:
------------------------------------------------------------------------
[2010-04-16 17:45:33] mluster79 at yahoo dot com
Description:
------------
I ran a test of numbers from -1000 to 1000. I passed the values into
'ctype_alpha', which I expected ALL output to be "Failure::xx".
However, I
receive "Success::xx" output on a variety of numbers from -125 to 255.
Test script:
---------------
for ($x = -1000;$x < 1000;$x++) {
echo ((ctype_alpha ($x)) ? "Success::{$x}" : "Failure::{$x}") .
PHP_EOL;
}
Expected result:
----------------
I expect to see nothing but "Failure::{xx}" all the way down.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51573&edit=1