ID: 42007 Updated by: [EMAIL PROTECTED] Reported By: adrian dot gheorghe at gmail dot com -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: Windows XP Sp2 PHP Version: 5.2.3 New Comment:
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. According to beginning of CType chapter, small numbers are compared differently. Equivalent part removed. Previous Comments: ------------------------------------------------------------------------ [2007-07-16 18:19:22] [EMAIL PROTECTED] Documentation shouldn't say it's equivalent to regex matching when it really isn't..docs need update, the function is fine as is. ------------------------------------------------------------------------ [2007-07-16 10:54:07] adrian dot gheorghe at gmail dot com Description: ------------ ctype_alnum returns false if you pass it an integer (ie 7). I know the docs say that it should receive a string, as all ctype_* functions should, but I believe it's pointless to have to do a ctype_alnum( '' . $var ) at every call just to be sure. Also, the docs say that the function is equivalent to preg_match('/^[a-z0-9]+$/iD', $text) and matching 7 against that expression will work. Reproduce code: --------------- var_dump( ctype_alnum( 7 ) ); Expected result: ---------------- bool(true) Actual result: -------------- bool(false) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42007&edit=1