ID:               39405
 User updated by:  spam at dragy dot de
 Reported By:      spam at dragy dot de
-Status:           Open
+Status:           Bogus
 Bug Type:         PCRE related
 Operating System: Any
 PHP Version:      5.2.0
 New Comment:

pcre.backtrack_limit=-1 in php.ini


Previous Comments:
------------------------------------------------------------------------

[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

Reply via email to