Home Menu

filter_id

Returns the filter ID belonging to a named filter

Syntax

filter_id ( string $filtername ) : int

Parameters

filtername

Name of a filter to get.

Return

ID of a filter on success or FALSE if filter doesn't exist.

Examples

1

<?

$filtername = "int";

$return = filter_id($filtername);

echo $return;

?>
257

2

<?

$filter_list = filter_list();

foreach ($filter_list as $filtername)
{
    $return = filter_id($filtername);

    echo "$filtername: $return\n";
}

?>
int: 257
boolean: 258
float: 259
validate_regexp: 272
validate_domain: 277
validate_url: 273
validate_email: 274
validate_ip: 275
validate_mac: 276
string: 513
stripped: 513
encoded: 514
special_chars: 515
full_special_chars: 522
unsafe_raw: 516
email: 517
url: 518
number_int: 519
number_float: 520
add_slashes: 523
callback: 1024

PHP

JesusBible
HTMLCSSJSPHPSVGMore
AboutTerms