|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #51573 ctype_alpha function
Submitted: 2010-04-16 17:45 UTC Modified: 2010-05-12 15:51 UTC
From: mluster79 at yahoo dot com Assigned:
Status: Not a bug Package: Strings related
PHP Version: 5.2.13 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: mluster79 at yahoo dot com
New email:
PHP Version: OS:


 [2010-04-16 17:45 UTC] mluster79 at yahoo dot com
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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-12 15:51 UTC]
-Status: Open +Status: Bogus
 [2010-05-12 15:51 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

If the argument is a integer, it is treated as an ascii code.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Feb 29 14:01:34 2024 UTC