- mb_split: documentation ( source)
- print_r: documentation ( source)
- mb_regex_encoding: documentation ( source)
- preg_split: documentation ( source)
- mb_internal_encoding: documentation ( source)
<?php
mb_regex_encoding('UTF-8');
mb_internal_encoding('UTF-8');
$arr = mb_split('\B', "你好"); # Array ( [0] => 你 [1] => 好 ) ## Okay!
print_r($arr);
$arr = preg_split('|\B|', "abc"); # Array ( [0] => 你 [1] => 你 ) ## Expected Result
print_r($arr); ## Instead, this message appears:
## Warning: mb_split(): mbregex search failure in mbsplit():
## no support in this configuration in /dir/foo.php on line 22
$arr = mb_split('\B', '隨著劇情的推進');
print_r($arr);