64) return false; $domain = idn_to_ascii($domain) . "."; return checkdnsrr($domain, "MX"); } function telegramValid(string $telegram): bool { return (bool) preg_match("/^(?:t.me\/|@)?([a-zA-Z0-9]{0,32})$/", $telegram); } use TSimpleSingleton; }