Is the PHP function filter_var('[email protected]', FILTER_VALIDATE_EMAIL)
validating the email using the standard RFC 5322?
PHP filter_var and RFC 5322
1.8k Views Asked by Marin Bînzari At
2
There are 2 best solutions below
0

As the author of the regular expression being used by filter_var
I can confirm that it doesn't comprehensively use RFC 5322 (specifically, it doesn't allow for comments and folding white space).
The article VolkerK links to contains updated validation -- including a more accurate implementation of RFC 5322 as well as an implementation of RFC 5321 (in my opinion the more appropriate standard) -- but filter_var
hasn't been updated to incorporate the improvements.
There's a comment in the implementation code of that filter:
and the "original" source is most likely: http://squiloople.com/2009/12/20/email-address-validation/
So, you have a claim and someone who fixed an alleged error and ...
...beyond that I have no clue ;-)