Edit report at http://bugs.php.net/bug.php?id=52931&edit=1
ID: 52931 Updated by: [email protected] Reported by: mail at lutz-petzoldt dot de Summary: strripos not overloaded with function overloading enabled -Status: Open +Status: Closed Type: Bug Package: mbstring related Operating System: Debian Linux 5 PHP Version: 5.3.3 -Assigned To: +Assigned To: felipe Block user comment: N New Comment: This bug has been fixed in SVN. 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: ------------------------------------------------------------------------ [2010-09-28 01:09:02] [email protected] Automatic comment from SVN on behalf of felipe Revision: http://svn.php.net/viewvc/?view=revision&revision=303805 Log: - Fixed bug #52931 (strripos not overloaded with function overloading enabled) ------------------------------------------------------------------------ [2010-09-27 10:08:18] mail at lutz-petzoldt dot de Description: ------------ It seems like strripos isn't overloaded with mb_strripos when function overloading is enabled. Both functions return different values on a haystack that contains multibyte characters, e.g. german umlauts in my case. Settings in php.ini: mbstring.func_overload = 7 mbstring.internal_encoding = utf-8 Test script: --------------- $string = '<body>Umlauttest öüä</body>'; var_dump(strlen($string)); var_dump(mb_strlen($string)); var_dump(strripos($string, '</body>')); var_dump(mb_strripos($string, '</body>')); Expected result: ---------------- int(27) int(27) int(20) int(20) Actual result: -------------- int(27) int(27) int(23) int(20) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=52931&edit=1
