Bug #69256 [Opn]: mb_split() cannot divide into char by char
| From: | cmb@php.net | Date: | Sat, 20 Aug 2016 10:49:01 +0000 |
| Subject: | Bug #69256 [Opn]: mb_split() cannot divide into char by char | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-203412@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69256&edit=1
ID: 69256
Updated by: cmb@php.net
Reported by: ryosuke_i_628 at yahoo dot co dot jp
Summary: mb_split() cannot divide into char by char
Status: Open
Type: Bug
-Package: Regexps related
+Package: mbstring related
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
I suspect that has the same cause as bug #69433.
Previous Comments:
------------------------------------------------------------------------
[2015-03-18 15:57:24] ryosuke_i_628 at yahoo dot co dot jp
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 this bug report at https://bugs.php.net/bug.php?id=69256&edit=1