ID: 39032 Updated by: [EMAIL PROTECTED] Reported By: tstarling at wikimedia dot org -Status: Open +Status: Closed Bug Type: Strings related Operating System: Linux PHP Version: 5.1.6 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. Fixed in 5.2 and HEAD. Previous Comments: ------------------------------------------------------------------------ [2006-10-04 08:37:51] tstarling at wikimedia dot org Description: ------------ strcspn() incorrectly stops on null characters, as if the function was implemented with null-terminated strings. Confirmed on PHP 5.1.6-pl4-gentoo (cli), PHP 5.1.4 Windows NT mod_php, PHP 5.1.4 FC4 cli. Reproduce code: --------------- print strcspn(chr(0),"x").", ".strcspn(chr(1),"x")."\n" Expected result: ---------------- 1, 1 Actual result: -------------- 0, 1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39032&edit=1