php8.5
Home/ Manual/ reference / taint/ Taint ConfigureOptions

Taint ConfigureOptions

Taint ConfigureOptionsNameDefaultChangeableChangelogtaint.enable0INI_SYSTEMtaint.error_level512 (E_USER_WARNING)INI_ALL

Runtime Runtime

NameDefaultChangeableChangelog
taint.enable0INI_SYSTEM
taint.error_level512 (E_USER_WARNING)INI_ALL

Title

taint.enablebool

Master switch. When enabled, taint hooks the executor and marks strings from $_GET, $_POST and $_COOKIE as tainted at request startup.

This is an Ini-only directive: enabling it requires a process restart, so it cannot be toggled per request or per directory.

Note

Do not enable this directive in production environments: the instrumentation slows every request down and is incompatible with the OPcache JIT.

taint.error_levelint

The error level used when taint reports a possibly tainted string. Defaults to E_USER_WARNING (512).

Because this directive is INI_ALL, it can be changed at runtime. For example, to silence taint warnings for the current script:

php
<?php
ini_set('taint.error_level', 0);
?>

Source: reference/taint/ini.xml · from the official PHP manual (php/doc-en)