is_tainted

(PECL taint >=0.1.0)

is_taintedCheck whether a string is tainted

Açıklama

function is_tainted(string $string): bool

Checks whether the given value carries the taint mark. Only strings can ever be tainted; any other type returns false.

Bağımsız Değişkenler

string

The value to check.

Dönen Değerler

Returns true if the value is a tainted string, false otherwise. Always returns false when taint.enable is off.

Örnekler

Örnek 1 is_tainted() example

<?php
$name = $_GET['name'] ?? 'world';
var_dump(is_tainted($name));
?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

bool(true)

Ayrıca Bakınız

  • taint() - Mark strings as tainted
  • untaint() - Remove the taint mark from strings
add a note

User Contributed Notes

There are no user contributed notes for this page.