|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-05-22 15:45 UTC] pajoye@php.net
[2011-03-17 22:54 UTC] dicr at net dot dn dot ua
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 16:00:01 2025 UTC |
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 "