Uri::filterPort( $port )

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only by core. It is listed here for completeness.

Source

private function filterPort($port): ?int
{
    if (null === $port) {
        return null;
    }
    $port = (int) $port;
    if (0 > $port || 0xffff < $port) {
        throw new \InvalidArgumentException(\sprintf('Invalid port: %d. Must be between 0 and 65535', $port));
    }
    return self::isNonStandardPort($this->scheme, $port) ? $port : null;
}

User Contributed Notes

You must log in before being able to contribute a note or feedback.