Edit report at https://bugs.php.net/bug.php?id=47708&edit=1
ID: 47708 Updated by: dtajchre...@php.net Reported by: david at grudl dot com Summary: explode() with empty delimiter -Status: Open +Status: Bogus Type: Feature/Change Request -Package: Feature/Change Request +Package: *General Issues PHP Version: 5.3.0beta1 Block user comment: N Private report: N New Comment: php.net/str_split Previous Comments: ------------------------------------------------------------------------ [2009-06-08 03:50:41] a at b dot c dot de "It must be done using preg_split..." ....Or str_split(). ------------------------------------------------------------------------ [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 https://bugs.php.net/bug.php?id=47708&edit=1