public static function fullyQualifiedDomainName(string $name): bool
    {
        $isValid = strlen($name) < 254;
        $isValid &= 1 === preg_match('/^(?:(?!-)[a-z0-9\-]{1,63}(?<!-)\.){1,127}$/i', $name);

        return $isValid;
    }
public static function fullyQualifiedDomainName(string $name): bool
    {
        $isValid = strlen($name) < 254;
        $isValid &= 1 === preg_match('/^(?:(?!-)[a-z0-9\-]{1,63}(?<!-)\.){1,127}$/i', $name);

        return $isValid;
    }
public static function fullyQualifiedDomainName ( string $ name ) : bool { $ isValid = strlen ( $ name ) < 254 ; $ isValid &= 1 === preg_match ( '/^(?:(?!-)[a-z0-9\-]{1,63}(?<!-)\.){1,127}$/i' , $ name ) ; return $ isValid ; }
Validate the string is a Fully Qualified Domain Name.

@param string $name

@return bool
Validate the string is a Fully Qualified Domain Name .