public static function isMail($email)
    {
        $parts = explode('@', $email);

        if (!is_string($email) || count($parts) != 2) {
            return false;
        }

        return (bool) filter_var($email, FILTER_VALIDATE_EMAIL);
    }
public static function isMail($email)
    {
        $parts = explode('@', $email);

        if (!is_string($email) || count($parts) != 2) {
            return false;
        }

        return (bool) filter_var($email, FILTER_VALIDATE_EMAIL);
    }
public static function isMail ( $ email ) { $ parts = explode ( '@' , $ email ) ; if ( ! is_string ( $ email ) || count ( $ parts ) != 2 ) { return false ; } return ( bool ) filter_var ( $ email , FILTER_VALIDATE_EMAIL ) ; }
Check if the email is a valid email.

eg: dakiafranck@gmail.com => true

@param string $email

@return bool
Check if the email is a valid email .