FUNC :: boolean is_hostname ( string hostname ) Returns TRUE if is public hostname format, FALSE if not. Notice: "localhost" it is not a public domain. Example:
echo FUNC::is_hostname('mail.test.net') ? 'Yes' : 'No';