How to validate an email address in PHP

In this article, different methods to validate an email address in PHP.It uses regular expressions and an inbuilt email validation function in PHP.
Using: regular function preg_match() validates an e-mail address:
Using: FILTER_VALIDATE_EMAIL filter validates an e-mail address:
You can use the filter_var() function, which gives you a lot of handy validation and sanitization options.