ID | 可用的过滤器 | 描述 |
---|
FILTER_FLAG_STRIP_LOW | FILTER_SANITIZE_ENCODED, FILTER_SANITIZE_SPECIAL_CHARS, FILTER_SANITIZE_STRING, FILTER_UNSAFE_RAW | 去除ASCII小于32的字符。 |
FILTER_FLAG_STRIP_HIGH | FILTER_SANITIZE_ENCODED, FILTER_SANITIZE_SPECIAL_CHARS, FILTER_SANITIZE_STRING, FILTER_UNSAFE_RAW | 去除ASCII在于127的字符。 |
FILTER_FLAG_ALLOW_FRACTION | FILTER_SANITIZE_NUMBER_FLOAT | 允许小数点分隔符(.) |
FILTER_FLAG_ALLOW_THOUSAND | FILTER_SANITIZE_NUMBER_FLOAT, FILTER_VALIDATE_FLOAT | 允许千位分隔符(,) |
FILTER_FLAG_ALLOW_SCIENTIFIC | FILTER_SANITIZE_NUMBER_FLOAT | 允许科学计数法(e或E)。 |
FILTER_FLAG_NO_ENCODE_QUOTES | FILTER_SANITIZE_STRING | 不编码引号(单引号和双引号)。 |
FILTER_FLAG_ENCODE_LOW | FILTER_SANITIZE_ENCODED, FILTER_SANITIZE_STRING, FILTER_SANITIZE_RAW | 编码ASCII小于32的字符。 |
FILTER_FLAG_ENCODE_HIGH | FILTER_SANITIZE_ENCODED, FILTER_SANITIZE_SPECIAL_CHARS, FILTER_SANITIZE_STRING, FILTER_SANITIZE_RAW | 编码ASCII大于127的字母。 |
FILTER_FLAG_ENCODE_AMP | FILTER_SANITIZE_STRING, FILTER_SANITIZE_RAW | 编码&符号。 |
FILTER_NULL_ON_FAILURE | FILTER_VALIDATE_BOOLEAN | 返回null当验证数据不是以下字符串时(yes,no,1,0,true,false,on,off)。 |
FILTER_FLAG_ALLOW_OCTAL | FILTER_VALIDATE_INT | 允许八进制数值(0开头)。 |
FILTER_FLAG_ALLOW_HEX | FILTER_VALIDATE_INT | 允许16进制数值。(0X或是0x开头)。 |
FILTER_FLAG_IPV4 | FILTER_VALIDATE_IP | IP4格式字符串。 |
FILTER_FLAG_IPV6 | FILTER_VALIDATE_IP | IP6格式字符串。 |
FILTER_FLAG_NO_PRIV_RANGE | FILTER_VALIDATE_IP | RFC指定的私域IP。IP4如下范围10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16。或是IP6以下开头的域: FD或FC |
FILTER_FLAG_NO_RES_RANGE | FILTER_VALIDATE_IP | 要求值不在保留的 IP 范围内。IPv4 ranges:0.0.0.0/8, 169.254.0.0/16,192.0.2.0/24 and 224.0.0.0/4。不能应用于IP6。 |
FILTER_FLAG_PATH_REQUIRED | FILTER_VALIDATE_URL | 要求URL包含路径部分。 |
FILTER_FLAG_QUERY_REQUIRED | FILTER_VALIDATE_URL | 要求URL查询字符串。 |