ID: 47708 Comment by: a at b dot c dot de Reported By: david at grudl dot com Status: Open Bug Type: Feature/Change Request PHP Version: 5.3.0beta1 New Comment:
"It must be done using preg_split..." ....Or str_split(). Previous Comments: ------------------------------------------------------------------------ [2009-03-18 18:30:00] david at grudl dot com Description: ------------ Splitting a string into array of characters is not easy in PHP. It must be done using preg_split (slow) and with a lot of parameters: $chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY); Feature request: allow function explode() to split string into characters. Usage: $chars = explode('', $str); Rationale: there is counterpart function implode() which allows to use empty separator: $str = explode('', $chars); // works ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47708&edit=1