From: pornel at despammed dot com Operating system: all PHP version: Irrelevant PHP Bug Type: Feature/Change Request Bug description: preg_split return only offsets
Description: ------------ PREG_SPLIT_OFFSET_CAPTURE is useful for creation of custom parsers - allows to find positions of matching strings. If offset is known - returned string is not needed, as it might be accessed in various other ways. I suggest adding flag PREG_SPLIT_OFFSETS_ONLY (or PREG_SPLIT_NO_CAPTURE) that would (hopefully) boost performance when preg_split is used to tokenize long strings. -- Edit bug report at http://bugs.php.net/?id=32458&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32458&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32458&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32458&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32458&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32458&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32458&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32458&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32458&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32458&r=support Expected behavior: http://bugs.php.net/fix.php?id=32458&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32458&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32458&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32458&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32458&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32458&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32458&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32458&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32458&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32458&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32458&r=mysqlcfg