Recently adopted by Gmail as published in Official Gmail Blog , and as defined in RFC 6530 :
Assuming a valida_email()
function that would return Boolean:
echo valida_email("té[email protected]"); // devolve TRUE
echo valida_email("香蕉@例子.cn"); // devolve TRUE
└────┬────┘
│
/* (supostamente escrevi [email protected]) */
Question
In PHP, how can we validate if the contents of a variable is a well-formatted e-mail address as defined in RFC 6530?
Note: It does not matter if it exists or does not exist, it matters that it is a valid email address under the existing rules that define the formatting, see RFC 6530 .