Determine the validity of email address
public static bool Asf_Util::isEmail(string $email)
Email Address
Returns TRUE on success or FALSE on failure
<?php var_dump(Asf_Util::isEmail('fanjiapeng@box3.cn')); var_dump(Asf_Util::isEmail('@126.com')); var_dump(Asf_Util::isEmail('1111@.com')); var_dump(Asf_Util::isEmail('11111-aaaa@163.com')); var_dump(Asf_Util::isEmail('222222aaabb@yahoo')); var_dump(Asf_Util::isEmail('222222aaabb@yahoo.'));
The above example will output:
bool(true) bool(false) bool(false) bool(true) bool(false) bool(false)