|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-04-17 01:53 UTC] scottmac@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 02:00:01 2025 UTC |
Description: ------------ Before submitting a bug, I consulted with Phillip Hazel, the maintainer of PCRE. He tested up to over 400k of data with PCRE and had no problems. So, I am thinking this is a PHP issue. Basically, (.+?) will not match over 99,997 bytes. This worked in PHP 5.0 and all previous versions I have used. Reproduce code: --------------- <?php $string = "<tag>".str_repeat("x", 99997)."</tag>"; if(preg_match('/<tag>(.+?)<\/tag>/', $string, $match)){ echo "Match 99997!\n"; } $string = "<tag>".str_repeat("x", 99998)."</tag>"; if(preg_match('/<tag>(.+?)<\/tag>/', $string, $match)){ echo "Match 99998!\n"; } ?> Expected result: ---------------- Match 99997! Match 99998! Actual result: -------------- Match 99997!