PHP | filter_list() Function Last Updated : 11 Feb, 2019 Comments Improve Suggest changes Like Article Like Report The filter_list() function is an inbuilt function in PHP which is used to returns the list of all supported filters. Syntax: array filter_list( void ) Parameters: This function does not accepts any parameters. Return Values: It returns an array containing all names of supported filters. If it returns an empty array then it does not contains any filters. The filter id can be obtained by filter_id() function. Note: This function available for PHP 5.2.0 and newer versions. Below examples illustrate the filter_id() function in PHP: Example 1: php <?php print_r(filter_list()); ?> Output: 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: It display the associated id of all the filters in a single list. php <?php // Array filter function assign to a variable $arr = filter_list(); // Use loop to display the key and its value while (list ($key, $val) = each ($ar2)) { echo "$key -> $val : ( ".filter_id($val). " ) <br>"; } ?> Output: 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 ) References: http://php.net/manual/en/function.filter-list.php Comment More infoAdvertise with us Next Article PHP | filter_list() Function G gekcho Follow Improve Article Tags : Web Technologies PHP PHP-array PHP-function Similar Reads PHP | filter_id() Function The filter_id() function is an inbuilt function in PHP which returns the filter ID of a specified filter name. It is used to get the filter id of the particular filter in PHP by using filter_id function by giving the name of the filter as input and get the associated id to it. Syntax: int filter_id( 2 min read PHP | filter_input() Function The filter_input() is an inbuilt function in PHP which is used to get the specific external variable by name and filter it. This function is used to validate variables from insecure sources, such as user input from form. This function is very much useful to prevent some potential security threat lik 2 min read PHP list() Function The list() function is an inbuilt function in PHP which is used to assign array values to multiple variables at a time. This function will only work on numerical arrays. When the array is assigned to multiple values, then the first element in the array is assigned to the first variable, second to th 2 min read PHP | filter_has_var() function The filter_has_var() function is an inbuilt function in PHP which is used to check whether the variable available or not especially it checks if a variable of a specified input type exist or not. It returns True on success or False on failure. Syntax: bool filter_has_var( $type, $variable_name ) Par 2 min read PHP | Imagick filter() Function The Imagick::filter() function is an inbuilt function in PHP which is used to apply custom convolution kernel to the image. A kernel, convolution matrix, or mask is a small matrix. It is used for blur, sharpen, embossing, edge detection, and many more. Syntax: bool Imagick::filter( $ImagickKernel, $ 1 min read PHP | preg_filter() Function The preg_filter() function is an inbuilt function in PHP which is used to perform a regular expression search and replace the text. Syntax: preg_filter( $pattern, $replacement, $subject, $limit, $count ) Parameters: This function accepts five parameters as mention above and describe below. $pattern: 2 min read PHP array_filter() Function This built-in function in PHP is used to filter the elements of an array using a user-defined function which is also called a callback function. The array_filter() function iterates over each value in the array, passing them to the user-defined function or the callback function. If the callback func 2 min read PHP | DsMap filter() Function The Ds\Map::filter() function is an inbuilt function in PHP which is used to create a new map using the filter function. Syntax: public Ds\Map::filter( $callback ) Parameters: It contains a single parameter $callback which is an optional parameter and it returns True if the value should be included, 2 min read PHP | DsSet filter() Function The Ds\Set::filter() function is an inbuilt function in PHP which is used to create new set using filter function. Syntax: Ds\Set public Ds\Set::filter( $callback ) Parameters: This function accepts single parameter $callback which is optional and it returns True if the value should be included, Fal 1 min read PHP | stream_get_filters() Function The stream_get_filters() function is an inbuilt function in PHP which is used to get the list of registered stream filters. Syntax: array stream_get_filters( void ) Parameters: This function does not accept any parameter. Return Value: This function returns an array containing the name of all availa 1 min read Like