Deprecated: Optional parameter $keys declared before required parameter $cms_id is implicitly treated as a required parameter in /home/www/dev/work/class/blog/CmsKey.php on line 75

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$title is deprecated in /home/www/dev/work/website/lvesu/class/controller/blog/php.php on line 28

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$outlink is deprecated in /home/www/dev/work/website/lvesu/template/blog/cms/php.manual.tpl on line 2

Deprecated: Creation of dynamic property lvesu\lvesu\controller\blog\php::$status is deprecated in /home/www/dev/work/website/lvesu/template/blog/index.head.php on line 2
PHP - Manual: filter_id - 互联网笔记

略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: filter_id

2025-05-17

filter_id

(PHP 5 >= 5.2.0, PHP 7, PHP 8)

filter_id返回与某个特定名称的过滤器相关联的id

说明

filter_id(string $name): int|false

参数

name

待获取的过滤器名称。

返回值

如果获取成功则返回过滤器 id,如果过滤器不存在则返回 false

参见

添加备注

用户贡献的备注 1 note

up
0
w0n4b3 at gmail dot com
13 years ago
[To get a list of filters and their IDs:]

<?php
$filters
= filter_list();
foreach(
$filters as $filter_name) {
echo
$filter_name .": ".filter_id($filter_name) ."<br>";
}
?>
Will result in:
boolean: 258
float: 259
validate_regexp: 272
validate_url: 273
validate_email: 274
validate_ip: 275
string: 513
stripped: 513
encoded: 514
special_chars: 515
unsafe_raw: 516
email: 517
url: 518
number_int: 519
number_float: 520
magic_quotes: 521
callback: 1024

官方地址:https://www.php.net/manual/en/function.filter-id.php

冷却塔厂家 广告
中文GPT4.0无需注册 广告
北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3