ID: 38597 Updated by: [EMAIL PROTECTED] Reported By: koen dot devreeze at gmail dot com -Status: Open +Status: Feedback Bug Type: PCRE related Operating System: Windows XP PHP Version: 5.1.5 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2006-08-25 19:59:49] koen dot devreeze at gmail dot com 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=38597&edit=1