ID: 46920 Updated by: scott...@php.net Reported By: gdiego at gmail dot com Status: Bogus Bug Type: PCRE related Operating System: linux PHP Version: 5.2.8 New Comment:
Check preg_last_error(), you've reached one of the limits set which both are 10,000 by default. http://www.php.net/manual/en/pcre.configuration.php Previous Comments: ------------------------------------------------------------------------ [2008-12-22 12:23:03] scott...@php.net Check preg_last_error(), you've reached one of the limits set which both are 10,000 by default. http://www.php.net/manual/en/pcre.configuration.php ------------------------------------------------------------------------ [2008-12-21 22:26:04] gdiego at gmail dot com Description: ------------ If the match for a regex is very long, it fails. Reproduce code: --------------- $a='A'; for ($i = 0; $i < 1024; $i++) $a.='a'; $a.='A'; var_dump(preg_match('/A(.*?)A/', $a, $m)); $a='A'; for ($i = 0; $i < 131072; $i++) $a.='a'; $a.='A'; var_dump(preg_match('/A(.*?)A/', $a, $m)); Expected result: ---------------- int(1) int(1) Actual result: -------------- int(1) int(0) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46920&edit=1