pub fn validate_domain(d: &[u8], hostname: bool) -> boolExpand description
php_filter_validate_domain_ex(): whether a non-empty string passes
filter_var($d, FILTER_VALIDATE_DOMAIN), with FILTER_FLAG_HOSTNAME
when hostname is set, without building the filter’s result.