src/includes/classes/Core/Utils/UrlCurrent.php
public function port(): string
    {
        if (($port = &$this->cacheKey(__FUNCTION__)) !== null) {
            return $port; // Cached this already.
        }
        return $port = (explode(':', $this->host(), 2) + ['', ''])[1];
    }
public function port(): string
    {
        if (($port = &$this->cacheKey(__FUNCTION__)) !== null) {
            return $port; // Cached this already.
        }
        return $port = (explode(':', $this->host(), 2) + ['', ''])[1];
    }
Current port number (as string).

@since 170124.74961 Enhancing support for ports.

@return string Current port (as string).