|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-05-18 11:58 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 21:00:01 2025 UTC |
Description: ------------ negative assertions doesn't work with long text (~60000bytes) as expected Reproduce code: --------------- function test($str, $cnt) { $str = 'test "123'.str_repeat($str,$cnt).'456"'; return preg_match('#".*?(?<!\\\\)"#', $str); } var_dump(test('\"', 20000)); //40K var_dump(test('\"', 30000)); //60K <-- var_dump(test('"', 100000)); //100K Expected result: ---------------- X-Powered-By: PHP/4.4.4 Content-type: text/html int(1) int(1) <-- int(1) Actual result: -------------- X-Powered-By: PHP/5.2.0 ( and PHP/5.2.2) Content-type: text/html int(1) int(0) <-- int(1)