Bug #15097 Updated: sunstr_count
| From: | martin at humany dot com | Date: | Tue, 22 Jan 2002 13:07:20 +0000 |
| Subject: | Bug #15097 Updated: sunstr_count | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-77764@lists.php.net to get a copy of this message | ||
ID: 15097
Comment by: martin@humany.com
Old Reported By: webmaster@devchina.com
Reported By: martin@humany.com
Status: Open
Bug Type: Strings related
Operating System: win2000
PHP Version: 4.1.1
New Comment:
This is not a bug. substr_count($haystack, $needle)
when haystack is "D¨D¨D" and needle is "D", it returns 3 of course,
since D is found 3 times in haystack
Previous Comments:
------------------------------------------------------------------------
[2002-01-18 06:50:52] webmaster@devchina.com
View my code:
$str1="D¨D¨D";
$str2="D";
print substr_count($str1,$str2);
return 3,right result is 1
the string "¨D" in Gb2312,is Chinese.
Used english is right,I don't konw where the problem in it.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=15097&edit=1