Home  >  Article  >  Backend Development  >  Preg_match regular matching string length problem analysis

Preg_match regular matching string length problem analysis

WBOY
WBOYOriginal
2016-07-25 08:54:39847browse
  1. ini_set(‘pcre.backtrack_limit’, 999999999);
Copy code

Note: This parameter is available after PHP 5.2.0 version.

About: pcre.recursion_limit pcre.recursion_limit is the recursion limit of pcre. If this item is set to a large value, the available stacks of all processes will be consumed, and eventually PHP will crash. You can also limit it by modifying the configuration:

  1. ini_set('pcre.recursion_limit', 99999);
Copy code

It is best to limit the memory:

  1. ini_set(' memory_limit', '64m'); .
Copy code


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn