php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #60103 Error on ctype_digit() function manual page
Submitted: 2011-10-20 13:42 UTC Modified: 2011-11-01 22:21 UTC
From: ivanhoe011 at gmail dot com Assigned: salathe (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2011-10-20 13:42 UTC] ivanhoe011 at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.ctype-digit
---

The above manual page contains a note that states: "This function requires a 
string to be useful, so for example passing in an integer will always return 
FALSE."

This is not true, as e.g. calling ctype_digit(48) will return TRUE. 

As explained elsewhere in the manual for all ctype_* functions:
"if you pass an integer smaller than 256 it will use the ASCII value 
of it to see if it fits in the specified range (digits are in 0x30-0x39). If the 
number is between -128 and -1 inclusive then 256 will be added and the check 
will be done on that."
 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-01 22:17 UTC] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&revision=318662
Log: note for ctype_* and integer input (doc #60103)
 [2011-11-01 22:21 UTC] salathe@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.

I added a note to all of the ctype_*() functions.
 [2011-11-01 22:21 UTC] salathe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: salathe
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 19:01:31 2024 UTC