PHP filter_list() 函数
完整的 PHP Filter 参考手册
定义和用法
filter_list() 函数返回包含所有得到支持的过滤器的一个数组。
语法
filter_list()
提示和注释
注释:该函数的结果不是过滤器 ID,而是过滤器名称。请使用 filter_id() 函数来获取过滤器 ID。
实例
<?php
print_r(filter_list());
?>
print_r(filter_list());
?>
代码的输出如下所示:
Array
(
[0] => int
[1] => boolean
[2] => float
[3] => validate_regexp
[4] => validate_url
[5] => validate_email
[6] => validate_ip
[7] => string
[8] => stripped
[9] => encoded
[10] => special_chars
[11] => unsafe_raw
[12] => email
[13] => url
[14] => number_int
[15] => number_float
[16] => magic_quotes
[17] => callback
)
(
[0] => int
[1] => boolean
[2] => float
[3] => validate_regexp
[4] => validate_url
[5] => validate_email
[6] => validate_ip
[7] => string
[8] => stripped
[9] => encoded
[10] => special_chars
[11] => unsafe_raw
[12] => email
[13] => url
[14] => number_int
[15] => number_float
[16] => magic_quotes
[17] => callback
)
完整的 PHP Filter 参考手册