From: embeddedlinuxguy at gmail dot com Operating system: Linux PHP version: 5.0.5 PHP Bug Type: Feature/Change Request Bug description: preg_split should return empty array when splitting ""
Description: ------------ $b = preg_split("/q/", "", PREG_SPLIT_NO_EMPTY); should return an empty array (0 elements). Instead it returns an array with one element which is an empty string, i.e. (""). This is the same with or without PREG_SPLIT_NO_EMPTY. Compare to Perl my @a = split(/q/, ""); Here @a == () not ("") -- Edit bug report at http://bugs.php.net/?id=34876&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34876&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34876&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34876&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34876&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34876&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34876&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34876&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34876&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34876&r=support Expected behavior: http://bugs.php.net/fix.php?id=34876&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34876&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34876&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34876&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34876&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34876&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34876&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34876&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34876&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34876&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34876&r=mysqlcfg