#42731 [Opn->Csd]: strcspn() gives incorrect output with mask as empty string with unicode on
| From: | tony2001@php.net | Date: | Tue, 02 Oct 2007 11:35:47 +0000 |
| Subject: | #42731 [Opn->Csd]: strcspn() gives incorrect output with mask as empty string with unicode on | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-118077@lists.php.net to get a copy of this message | ||
ID: 42731
Updated by: tony2001@php.net
Reported By: nikhil dot gupta at in dot ibm dot com
-Status: Open
+Status: Closed
Bug Type: *Unicode Issues
Operating System: Linux, Win32-xp
PHP Version: 6CVS-2007-09-21 (CVS)
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2007-09-21 20:21:41] nikhil dot gupta at in dot ibm dot com
Description:
------------
strcspn() when passed with an empty mask string, returns the length of
the input string (first arg) with unicode off on PHP6 whereas returns
ZERO with unicode ON which is not correct behaviour.
Reproduce code:
---------------
<?php
var_dump( strcspn("abcde","") );
?>
Expected result:
----------------
int(5)
Actual result:
--------------
int(0)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42731&edit=1