|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-08-20 10:49 UTC] cmb@php.net
-Package: Regexps related
+Package: mbstring related
[2016-08-20 10:49 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 18:00:02 2025 UTC |
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]