Bug #69776 [NEW]: mb_strlen() produces different results from previous PHP versions

From: Date: Mon, 08 Jun 2015 19:47:06 +0000
Subject: Bug #69776 [NEW]: mb_strlen() produces different results from previous PHP versions
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-193210@lists.php.net to get a copy of this message
From: martijn at vanderlee dot com Operating system: Any PHP version: 5.6.9 Package: mbstring related Bug Type: Bug Bug description:mb_strlen() produces different results from previous PHP versions Description: ------------ mb_strlen() on PHP 5.6 sometimes returns different values than the exact same call on previous versions of PHP (tested with 5.3, 5.4 and 5.5). For the given test script, PHP 5.6 returns "17" whereas all other versions return "31". It seems 5.6 is correct, however, when using the mb_ereg_search_* functions, they still return match lengths like PHP 5.5 and before. i.e. they total up to 31 for the entire string. Regardless of which version is right, all multibyte functions should atleast produce consistent results within the same version of PHP. Test script: --------------- echo mb_strlen('από το Άξιον Εστί'); -- Edit bug report at https://bugs.php.net/bug.php?id=69776&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69776&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69776&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69776&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=69776&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=69776&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=69776&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=69776&r=needscript Try newer version: https://bugs.php.net/fix.php?id=69776&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=69776&r=support Expected behavior: https://bugs.php.net/fix.php?id=69776&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=69776&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=69776&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=69776&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69776&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=69776&r=dst IIS Stability: https://bugs.php.net/fix.php?id=69776&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=69776&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=69776&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=69776&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=69776&r=mysqlcfg

« previous php.bugs (#193210) next »