From: david at grudl dot com Operating system: PHP version: 5.3.0beta1 PHP Bug Type: Feature/Change Request Bug description: explode() with empty delimiter
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 bug report at http://bugs.php.net/?id=47708&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47708&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47708&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47708&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47708&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47708&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47708&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47708&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47708&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47708&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47708&r=support Expected behavior: http://bugs.php.net/fix.php?id=47708&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47708&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47708&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47708&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47708&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47708&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47708&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47708&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47708&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47708&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47708&r=mysqlcfg