public function getHttpHost(): string
    {
        $scheme = $this->getScheme();
        $port   = $this->getPort();

        if (
            ('http' === $scheme && $port === 80)
            || ('https' === $scheme && $port === 443)
        ) {
            return $this->getHost();
        }

        return $this->getHost() . ':' . $port;
    }
public function getHttpHost(): string
    {
        $scheme = $this->getScheme();
        $port   = $this->getPort();

        if (
            ('http' === $scheme && $port === 80)
            || ('https' === $scheme && $port === 443)
        ) {
            return $this->getHost();
        }

        return $this->getHost() . ':' . $port;
    }
public function getHttpHost ( ) : string { $ scheme = $ this -> getScheme ( ) ; $ port = $ this -> getPort ( ) ; if ( ( 'http' === $ scheme && $ port === 80 ) || ( 'https' === $ scheme && $ port === 443 ) ) { return $ this -> getHost ( ) ; } return $ this -> getHost ( ) . ':' . $ port ; }
Returns the HTTP host being requested.

The port name will be appended to the host if it's non-standard.

@return string
Returns the HTTP host being requested .