private function getHostLength() { $hostLength = strpos($this->url, '/'); $hostLength = $hostLength === false ? strlen($this->url) : $hostLength; return $hostLength; }