Change language

PHP Filter_list () function

|
Syntax:
array filter_list (void)
Parameters:this function is not takes no parameters.Returned Values:Returns an array containing all the supported filter names. If it returns an empty array, then it does not contain any filters. The filter ID can be obtained using the filter_id() function.Note.This function is available for PHP 5.2.0 and newer.Below are examples illustrating the filter_id() function in PHP:Example 1:
print_r (filter_list());
?>
Exit:
Array ([ 0] = > int [1] = > boolean [2] = > float [3] = > validate_regexp [4] = > validate_domain [5] = > validate_url [6] = > validate_email [7 ] = > validate_ip [8] = > validate_mac [9] = > string [10] = > stripped [11] = > encoded [12] = > special_chars [13] = > full_special_chars [14] = > unsafe_raw [15] = > email [16] = > url [17] = > number_int [18] = > number_float [19] = > magic_quotes [20] = > callback)  Example 2:displays the associated ID of all filters in one list.       
// Array filter function assigned to variable $arr = filter_list();  
// Using a loop to display the key and its value while (list ( $key , $val ) = each ( $ar2 )) { echo " $key -> $val: (" . filter_id ( $val ). ")
"
; }  
?>
Exit:
0 -> int: (257) 
1 -> boolean: (258)
2 -> float: (259)
3 -> validate_regexp: (272)
4 -> validate_domain: (277)
5 -> validate_url: (273)
6 -> validate_email: (274)
7 -> validate_ip: (275)
8 -> validate_mac: (276)
9 -> string: (513)
10 -> stripped: (513)
11 -> encoded: (514)
12 -> special_chars: (515)
13 -> full_special_chars: (522)
14 -> unsafe_raw: (516)
15 -> email: (517)
16 -> url: (518)
17 -> number_int: (519)
18 -> number_float: (520)
19 -> magic_quotes: (521)
20 -> callback: (1024)
Links: http://php.net/manual/en/function.filter-list.php

Shop

Best laptop for Sims 4

$

Best laptop for Zoom

$499

Best laptop for Minecraft

$590

Best laptop for engineering student

$

Best laptop for development

$

Best laptop for Cricut Maker

$

Best laptop for hacking

$890

Best laptop for Machine Learning

$950

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers

Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method