Skip to content

Glossary: PHP Basics

filter_var()

Also written: filter_var, FILTER_VALIDATE_EMAIL, FILTER_VALIDATE_INT

A function that checks a value's format: it returns the value if valid and `false` if not. Used with filters like `FILTER_VALIDATE_EMAIL` to check an email address.

Where the book teaches it

Related terms

validation