PHP Filter

PHP Filters are extensions use to validate inputs from a user or web services .

We must use filter functions to filter the data

Mainly two types of files are out there (Validating filters and sanitizing filters)

Example :

filter_var(variable, filter, options)

Variable : its holds the values to be filtered
filter : Its the id of filter .its an optional and the default filter is FILTER_SANITIZE_STRING

options : can be an array of options/flags

Leave a Reply

Your email address will not be published. Required fields are marked *