#37550 [Opn->Bgs]: preg_match has string size limit
| From: | pajoye@php.net | Date: | Mon, 22 May 2006 15:45:41 +0000 |
| Subject: | #37550 [Opn->Bgs]: preg_match has string size limit | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-97450@lists.php.net to get a copy of this message | ||
ID: 37550
Updated by: pajoye@php.net
Reported By: Arne dot Heizmann at csr dot com
-Status: Open
+Status: Bogus
Bug Type: Regexps related
Operating System: Windows 2000
PHP Version: 5.1.4
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
You reached the backtrace limit (BACKTRACE_LIMIT_ERROR).
With php 5.2 and up (cvs only yet), you can check the last preg error
with preg_last_error.
Previous Comments:
------------------------------------------------------------------------
[2006-05-22 15:12:56] Arne dot Heizmann at csr dot com
Description:
------------
preg_match() stops working properly at some minimum string length.
Reproduce code:
---------------
<?
$str1 = 'a@b%c@d' . str_repeat ('=', 3333326);
$str2 = 'a@b%c@d' . str_repeat ('=', 3333327);
$regexp = '/^(.*)@(.*)%(.*)$/si';
echo preg_match ($regexp, $str1) ? "Correct " : "Wrong "; // works
correctly
echo preg_match ($regexp, $str2) ? "Correct " : "Wrong "; //
exhibits the bug
?>
Expected result:
----------------
"Correct Correct "
Actual result:
--------------
"Correct Wrong "
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37550&edit=1