php.net |  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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mluster79 at yahoo dot com
New email:
PHP Version: OS:

 

 [2010-04-16 17:45 UTC] 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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-12 15:51 UTC] mike@php.net
-Status: Open +Status: Bogus
 [2010-05-12 15:51 UTC] mike@php.net
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.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Feb 28 15:01:28 2020 UTC