PHP Velho Oeste 2024

Configuración en tiempo de ejecución

El comportamiento de estas funciones se ve afectado por la configuración de php.ini.

Opciones de configuración de PCRE
Nombre Por defecto Cambiable Historial de cambios
pcre.backtrack_limit "1000000" INI_ALL  
pcre.recursion_limit "100000" INI_ALL  
pcre.jit "1" INI_ALL  
Para más detalles y definiciones de los modos de INI_*, vea Dónde se puede realizar un ajuste de configuración.

He aquí una breve explicación de las directivas de configuración.

pcre.backtrack_limit integer

Límite de retroceso de PCRE. Por defecto es 100000 para PHP < 5.3.7.

pcre.recursion_limit integer

Límite de recursividad de PCRE. Por favor, observe que si establece este valor con un número alto se podría consumir toda la pila de procesos disponible y provocar finalmente el malfuncionamiento de PHP (a causa de alcanzar el límite del tamaño de la pila impuesto por el sistema operativo).

pcre.jit bool

Si se va a utilizar la compilacion «just-in-time» de PCRE.

add a note add a note

User Contributed Notes 2 notes

up
-6
chris at ocproducts dot com
13 years ago
pcre.backtrack_limit sets the maximum bind length PREG calls (e.g. preg_replace_callback) can make. However the actual maximum seems to be approximately half the value set here, possibly due to the character encoding that PCRE runs with internally.
up
-15
610010559 at qq dot com
4 years ago
pcre.backtrack_limit can be set to -1;
ini_set("pcre.backtrack_limit", "-1");

after i put the above code in my code, it works;
so i guess -1 means infinite(i am not very sure ,but it works);
so when you have not idea how much it should be set in your program, you can try this.
To Top