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
 [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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 11:01:33 2024 UTC