Edit report at http://bugs.php.net/bug.php?id=37550&edit=1

 ID:                 37550
 Comment by:         dicr at net dot dn dot ua
 Reported by:        Arne dot Heizmann at csr dot com
 Summary:            preg_match has string size limit
 Status:             Bogus
 Type:               Bug
 Package:            Regexps related
 Operating System:   Windows 2000
 PHP Version:        5.1.4
 Block user comment: N
 Private report:     N

 New Comment:

preg_match documentation does not include any comments about string.
Also, the 

BUG appear for not so large strings. So, this is either undocumented
feature or 

the BUG. Please, don't refer to help forum, because this is really
happens !!!!


Previous Comments:
------------------------------------------------------------------------
[2006-05-22 15:45:40] paj...@php.net

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.

------------------------------------------------------------------------
[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/bug.php?id=37550&edit=1

Reply via email to