|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-08-25 20:21 UTC] edink@php.net
[2006-08-25 20:33 UTC] koen dot devreeze at gmail dot com
[2006-08-25 20:35 UTC] koen dot devreeze at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 10:00:01 2025 UTC |
Description: ------------ When processing this code. The parsing ends on the preg_match function. $t has 475 characters in it. Remove one char and the script works again. PS.: This was also tested with php 5.1.4 on gentoo linux without any problems. Reproduce code: --------------- $t = "---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"; $text = " <p>".$t."</p> <p>Some text doesn't matter how long</p> "; //echo strlen($t); $pattern = '/<p([a-z "=]*)?>((.)*?)<(\/)?p>/'; preg_match($pattern, $text, $paragraphs) or die("died"); echo $paragraphs[0]; Expected result: ---------------- $t should be displayed no matter how many chars it has (though considering limitation of PCRE). Actual result: -------------- Script ends on preg_match after a few seconds of 100% CPU load. No errors no crashes.