|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-12-24 09:31 UTC] e dot furmanyuk at timeweb dot ru
[2014-12-24 10:37 UTC] laruence@php.net
[2014-12-24 10:37 UTC] laruence@php.net
-Status: Open
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 19:00:01 2025 UTC |
Description: ------------ Greetings. If set in php.ini mbstring.func_overload=2 mbstring.internal_encoding="UTF-8" or in .htaccess php_value mbstring.func_overload 2 php_value mbstring.internal_encoding UTF-8 And set enable extension mbstring and opcache. And after all run the script, the result will be the first implementation of the correct result, but subsequent executions F5 will give an incorrect result. Strlen not overload by mb_strlen. Other function such as substr and strtolower and etc work perfectly. If you disable opcahe problem disappears. Test script: --------------- <?php echo "strlen = ".strlen("\xd0\xa2\xd0\xa2\xd0\xa2\xd0\xa2\xd0\xa2\xd0\xa2")."\n<br>" ; echo "mb_strlen = ".mb_strlen ("\xd0\xa2\xd0\xa2\xd0\xa2\xd0\xa2\xd0\xa2\xd0\xa2")."\n<br>"; ?> Expected result: ---------------- 6 6 Actual result: -------------- 12 6