From: glideraerobatics at hotmail dot com Operating system: PHP version: 5.2.6 PHP Bug Type: Feature/Change Request Bug description: PCRE objects in addition to the existing functions
Description: ------------ Most (if not all) other languages (such as javascript, Perl using the qr// operator) that support PCRE regular expressions have some means of creating pre-compiled PCRE objects. These are very useful in that these objects can be passed around inside an application into functions that require a valid regular expression as argument. Using a PCRE object, these functions just have use the 'instance of' operator in order to make sure that the arguments are of the correct type. Pre-compiled PCRE objects can also boost performance in the sense that the expression is compiled once where needed, used one or more times and then disposed of. Sounds similar to how SQL statements are or should be used. I assume that PHP currently compiles and caches string type regular expressions internally so in that case the only performance advantage will be the disposing of the unused regexp. -- Edit bug report at http://bugs.php.net/?id=46503&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=46503&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=46503&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=46503&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=46503&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=46503&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=46503&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=46503&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=46503&r=needscript Try newer version: http://bugs.php.net/fix.php?id=46503&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=46503&r=support Expected behavior: http://bugs.php.net/fix.php?id=46503&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=46503&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=46503&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=46503&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=46503&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=46503&r=dst IIS Stability: http://bugs.php.net/fix.php?id=46503&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=46503&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=46503&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=46503&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=46503&r=mysqlcfg