(PECL taint >=0.1.0)
is_tainted — 检查一个字符串是否被污染
string待检查的值。
如果该值是被污染的字符串,返回 true,否则返回 false。
当 taint.enable 未开启时,
始终返回 false。
示例 #1 is_tainted() 示例
<?php
$name = $_GET['name'] ?? 'world';
var_dump(is_tainted($name));
?>以上示例的输出类似于:
bool(true)