ID: 39405 Updated by: [EMAIL PROTECTED] Reported By: spam at dragy dot de Status: Bogus Bug Type: PCRE related Operating System: Any PHP Version: 5.2.0 New Comment:
I was wrong, there are pcre.backtrack_limit and pcre.recursion_limit directives, which might be used to control this functionality. Previous Comments: ------------------------------------------------------------------------ [2006-11-06 20:50:17] spam at dragy dot de pcre.backtrack_limit=-1 in php.ini ------------------------------------------------------------------------ [2006-11-06 20:48:02] ludvig dot ericson at gmail dot com This is because of limits intentionally set, see the ini setting pcre.backtrack_limit. ------------------------------------------------------------------------ [2006-11-06 18:45:23] spam at dragy dot de Description: ------------ The following preg_replace breaks when the string is => 24999 characters. Works perfectly fine with 24998 characters and worked fine with any strings in PHP 5.1.5. Reproduce code: --------------- <?php $string = str_repeat('a', 100000); echo preg_replace('#(^.*|.*)(\[(php|html|noparse)\].*\[/\\3])(.*|.*$)#siUe', '', $string); ?> Expected result: ---------------- 100.000 times 'a' Actual result: -------------- nothing ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39405&edit=1