Bug #69256 [NEW]: mb_split() cannot divide into char by char
| From: | ryosuke_i_628 at yahoo dot co dot jp | Date: | Wed, 18 Mar 2015 15:57:24 +0000 |
| Subject: | Bug #69256 [NEW]: mb_split() cannot divide into char by char | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-191449@lists.php.net to get a copy of this message | ||
From: ryosuke_i_628 at yahoo dot co dot jp
Operating system:
PHP version: Irrelevant
Package: Regexps related
Bug Type: Bug
Bug description:mb_split() cannot divide into char by char
Description:
------------
mb_split() cannot divide into char by char using the expression
'(?<!\A)(?!\z)'.
Test script:
---------------
$str = "ããããã";
mb_regex_encoding('UTF-8');
print_r([
'PCRE' => preg_split('/(?<!\A)(?!\z)/u', $str),
'鬼è»' => mb_split('(?<!\A)(?!\z)', $str)
]);
Expected result:
----------------
Array
(
[PCRE] => Array
(
[0] => ã
[1] => ã
[2] => ã
[3] => ã
[4] => ã
)
[鬼è»] => Array
(
[0] => ã
[1] => ã
[2] => ã
[3] => ã
[4] => ã
)
)
[Finished in 0.5s]
Actual result:
--------------
Array
(
[PCRE] => Array
(
[0] => ã
[1] => ã
[2] => ã
[3] => ã
[4] => ã
)
[鬼è»] => Array
(
[0] => ã
[1] => ãããã
)
)
[Finished in 0.5s]
--
Edit bug report at https://bugs.php.net/bug.php?id=69256&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69256&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69256&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69256&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69256&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69256&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69256&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69256&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69256&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69256&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69256&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69256&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69256&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69256&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69256&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69256&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69256&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69256&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69256&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69256&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69256&r=mysqlcfg