Hi,

On Thu, Nov 6, 2014 at 8:19 AM, Kévin Dunglas <dung...@gmail.com> wrote:
> Hi Andrey,
>
> Sorry but I think you're wrong. Domain != hostname. Underscore are allowed
> in domains (RFC 2181) but not in hostnames (RFC 1123 and next). To quote
> Wikipedia:
>
> "While a hostname may not contain other characters, such as the underscore
> character (_), other DNS names may contain the underscore. Systems such
> asDomainKeys and service records use the underscore as a means to assure
> that their special character is not confused with hostnames. For
> example,_http._sctp.www.example.com specifies a service pointer for an SCTP
> capable webserver host (www) in the domain example.com."
> http://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names
>
> You can also see this StackOverflow answer
> http://stackoverflow.com/a/2183140/1352334

I agree to an extent, but that is highly contextual.

Who said that 'domain' === 'DNS record' (which is a very broad term
anyway)? And IF we assume this, why do you need FILTER_VALIDATE_DOMAIN
for it if it's only going to check length?

Cheers,
Andrey.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to