|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-11-10 12:35 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 09:00:02 2025 UTC |
Description: ------------ Expression "<table>(.*?)</table>" not work with big text string. On PHP 4 & 5.1.2 - all ok. memory_limit = 128M Reproduce code: --------------- Windows XP, PHP 5.2.0: $buf="A".str_repeat("x",9999997)."B"; // 9 999 997 var_dump(preg_match("!A(.*)B!is", $buf, $ok)); // 1 var_dump(preg_match("!A(.*?)B!is", $buf, $ok)); // 0 $buf="A".str_repeat("x",9999996)."B"; // 9 999 996 var_dump(preg_match("!A(.*)B!is", $buf, $ok)); // 1 var_dump(preg_match("!A(.*?)B!is", $buf, $ok)); // 1 Windows 2000, PHP 5.2.0: $buf="A".str_repeat("x",99997)."B"; // 99 997 var_dump(preg_match("!A(.*)B!is", $buf, $ok)); // 1 var_dump(preg_match("!A(.*?)B!is", $buf, $ok)); // 0 $buf="A".str_repeat("x",99996)."B"; // 99 996 var_dump(preg_match("!A(.*)B!is", $buf, $ok)); // 1 var_dump(preg_match("!A(.*?)B!is", $buf, $ok)); // 1 Windows 2000, PHP 4.4.2: $buf="A".str_repeat("x",9999997)."B"; // 9 999 997 var_dump(preg_match("!A(.*)B!is", $buf, $ok)); // 1 var_dump(preg_match("!A(.*?)B!is", $buf, $ok)); // 0 $buf="A".str_repeat("x",9999996)."B"; // 9 999 996 var_dump(preg_match("!A(.*)B!is", $buf, $ok)); // 1 var_dump(preg_match("!A(.*?)B!is", $buf, $ok)); // 1 Windows 2000, PHP 5.1.2: $buf="A".str_repeat("x",9999997)."B"; // 9 999 997 var_dump(preg_match("!A(.*)B!is", $buf, $ok)); // 1 var_dump(preg_match("!A(.*?)B!is", $buf, $ok)); // 0 $buf="A".str_repeat("x",9999996)."B"; // 9 999 996 var_dump(preg_match("!A(.*)B!is", $buf, $ok)); // 1 var_dump(preg_match("!A(.*?)B!is", $buf, $ok)); // 1 Actual result: -------------- Please up this memory block from 99Kb to <memory_limit> on Windows 2000!