ID:          39024
 Updated by:  [EMAIL PROTECTED]
 Reported By: [EMAIL PROTECTED]
-Status:      Open
+Status:      Closed
 Bug Type:    Documentation problem
 PHP Version: Irrelevant
 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.

Fixed in CVS.


Previous Comments:
------------------------------------------------------------------------

[2006-10-03 10:56:34] [EMAIL PROTECTED]

Description:
------------
The manual page for ctype_alnum() -
http://www.php.net/manual/en/function.ctype-alnum.php - states that
"the function is equivalent to preg_match('/^[a-z0-9]+$/i', $text).".
However $ matches a trailing newline as well as the end of the subject;
it should be replaced with \z which only matches the end of the subject.

Reproduce code:
---------------
$s = "abc\n";
var_dump(ctype_alnum($s), preg_match("/^[a-z0-9]+$/i", $s));

Expected result:
----------------
bool(false)
int(0)

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


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=39024&edit=1

Reply via email to