NYCPHP Meetup

NYPHP.org

[nycphp-talk] ctype_digit in PHP 5.1.x

Daniel Convissor danielc at analysisandsolutions.com
Fri Dec 2 13:17:24 EST 2005


Hey Scott, et al:

On Fri, Dec 02, 2005 at 12:11:05PM -0500, csnyder wrote:
> 
> Nevertheless, it is well documented that the ctype functions return
> TRUE on empty values, so if you're going to use them you have to
> expect it.

I wouldn't call this well documented.  While the sentence "When called 
with an empty string the result will always be TRUE" appears on the ctype 
function reference page, http://www.php.net/manual/en/ref.ctype.php, who 
looks at that?  This should be stated on each ctype function's page.  For 
example, it's not listed on ctype_digit(), http://www.php.net/ctype_digit.

Now Hans' test shows that the behavior isn't what's documented.  Seems 
like some research is in order.  Scott, want to go the distance? :)  
Please?

First, look through the cvs commit list / cvs change logs to see if the 
change in 5.1 was intentional.  If it was not, open a bug about the 
change.

Second, check the relevant documentation out from CVS.  Adjust the 
documentation files as needed to explain the state of affairs then make a 
patch via (cvs diff -u).  Put the patch on a website somewhere.  Open up a 
documentation bug pointing to the patch file.

To get the CVS sources for the docs...
Login:
  cvs -d :pserver:cvsread at cvs.php.net:/repository login
Password is:
  phpfi

Checkout (all on one line):
  cvs -d :pserver:cvsread at cvs.php.net:/repository checkout 
    phpdoc/en/reference/ctype

If you need help understanding DocBook XML, let me know.

--Dan

-- 
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
            data intensive web and database programming
                http://www.AnalysisAndSolutions.com/
 4015 7th Ave #4, Brooklyn NY 11232  v: 718-854-0335 f: 718-854-0409



More information about the talk mailing list