Zend\Uri\Uri::validateHost
Validate the host part
Users may control which host types to allow by passing a second parameter with a bitmask of HOST_* constants which are allowed. If not specified, all address types will be allowed. Note that the generic URI syntax allows different host representations, including IPv4 addresses, IPv6 addresses and future IP address formats enclosed in square brackets, and registered names which may be DNS names or even more complex names. This is different (and is much more loose) from what is commonly accepted as valid HTTP URLs for example.
Signature
public function validateHost(string
$host,
[int
$allowed = self::HOST_ALL] )
Parameters
$host
— string$allowed
— int- bitmask of allowed host types
Returns
- bool