|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2019-04-19 11:23 UTC] 2317216477 at qq dot com
Description: ------------ preg_* function cannot get correct result in php7.0~7.2 sometimes the test string is too long so I put a test script on my github page(https://github.com/icy2003/php/blob/master/samples/php7preg_bug.php) you can test this script on this website:https://3v4l.org/,or you can install php 7.0~7.2 in local environment Test script: --------------- https://github.com/icy2003/php/blob/master/samples/php7preg_bug.php Expected result: ---------------- my pattern expected some results but in php7.0~7.2 it will be empty array!! you can use "ini_set" and set "pcre.jit" to 0 before preg_* functions to fix the problem PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 20 07:00:01 2025 UTC |
Your regular expression is too inefficient to be used with JIT mode on such a large input. PCRE (not PHP) is aborting executing because it ran out of stack space - preg_last_error() = PREG_JIT_STACKLIMIT_ERROR (6). Disabling JIT for that regex is a workaround. Fixing the regex is better. But personally I would consider using SimpleXML to find the <w:p> elements, scan for your ${var} or ${/var} tokens, then... I don't know what you want to do from there.