|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-08-23 13:44 UTC] cmb@php.net
-Status: Open
+Status: Verified
-Assigned To:
+Assigned To: cmb
[2015-08-23 13:44 UTC] cmb@php.net
[2015-08-23 13:53 UTC] cmb@php.net
[2015-08-23 13:54 UTC] cmb@php.net
-Status: Verified
+Status: Closed
[2015-08-23 13:54 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 15:00:02 2026 UTC |
Description: ------------ As reported in #67576 , the doc says "The maximum number of captured substrings is 65535. ". However, the test script failed. It raised a warning: > Warning: preg_match(): Compilation failed: regular expression is too large at offset 21000 and followed by the instructions in #67576 , if I edit 7000 to 6552, everything works. So is it a documentation problem or I misunderstand something? Test script: --------------- <?php ini_set("pcre.backtrack_limit", -1); ini_set("pcre.recursion_limit", -1); $test2 = str_repeat('a',10000); //7000 is much smaller than 65535 if (preg_match('/'.str_repeat('(a)',7000).'/', $test2, $regs2)) { var_dump($regs2); } else { echo 'Not find'; } Expected result: ---------------- output the results of preg_match Actual result: -------------- Warning: preg_match(): Compilation failed: regular expression is too large at offset 21000