Efficient Filtering and validation We just finished looking at preg_match and regular expressions in general. One thing that you might have quickly realized was that it’s how we used to validate whether an email was valid or not. There’s an easier way to do that now and it’s with the filter_var function. We won’t go into all of the details, but let’s explore the filter_var built-in function. trim(),  ltrim() ,  rtrim() htmlspecialchars() __call() preg_match() filter_var() addslashes() str_replace() strlen() strtolower() strtoupper() ucfirst() strpos(), stripos(), strrpos(), strripos() Array Functions like: array_chunk(), array_diff(), array_key_exists(), array_key_first(), array_key_last(), array_map(), array_merge(), array_push(), array_sum(), asort(), arsort(), count(), in_array(), ksort(), krsort(), sort(), rsort(), shuffle(), sizeof(),