Gone are the days when we used to validate email addresses, URLs by writing regular expressions or writing number of lines of code.
PHP > 5.2.x provides validation filters using which validations become very easy and less time consuming thing. Have a look to following
code for email and URL validation and there are lots more in PHP Validation Filters:

Email Validation:

URL Validation:

URL validation with GET paramerters:

For more click here: PHP Manual

Note: PHP Validate feature works for PHP Versions (PHP 5 >= 5.2.0) according to documentation.