I\'m trying to split a utf8 encoded string into an array of chars. The function that I now use used to work, but for some reason it doesn\'t work anymore. W
This is the best solution!:
I've found this nice solution in the PHP manual pages.
preg_split('//u', $str, null, PREG_SPLIT_NO_EMPTY);
It works really fast:
In PHP 5.6.18 it split a 6 MB big text file in a matter of seconds.
Best of all. It doesn't need MultiByte (mb_) support!
Similar answer also here.