253 || preg_match('/\s/', $host) || ! preg_match('/^[a-z0-9.-]+$/', $host)) { throw new InvalidArgumentException('Enter a valid hostname, such as book.example.com.'); } return $host; } }