php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #35526 Behavior of ctype_* functions in PHP 5.1 is inconsistent with documentation.
Submitted: 2005-12-02 20:36 UTC Modified: 2005-12-06 16:43 UTC
From: scottmattocks@php.net Assigned:
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: N/A
Private report: No CVE-ID: None
 [2005-12-02 20:36 UTC] scottmattocks@php.net
Description:
------------
The ctype_* functions were updated in 5.1 to return false when passed an empty string. The documentation does not reflect this change. 

A patch for the docs can be found at: http://crisscott.com/tmp/ctype_5_1.patch

Reproduce code:
---------------
var_dump(ctype_digit(''));

Expected result:
----------------
According to documentation:
bool(true)

Actual result:
--------------
bool(false)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-12-02 21:59 UTC] scottmattocks@php.net
Patch updated on 2005-12-02 15:55 EST (GMT -500).
Updated patch includes changelog for reference.xml. 

As recommended by Daniel Convissor, "Seems like an explanation of the pre-5.1 and post-5.1 return values would be most helpful in the returnvalues refsect." This is not included in the patch. If there is a sample of what this type of change might look like, please point me to it and I will add it to the patch file.
 [2005-12-06 16:44 UTC] vrana@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.

"When called with an empty string the result will always be TRUE in PHP < 5.1 and FALSE since 5.1." in ref.ctype
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 13:01:29 2024 UTC