WordPress\AiClientDependencies\Psr\Http\Message

UriInterface::withPortpublicWP 1.0

Return an instance with the specified port.

This method MUST retain the state of the current instance, and return an instance that contains the specified port.

Implementations MUST raise an exception for ports outside the established TCP and UDP port ranges.

A null value provided for the port is equivalent to removing the port information.

Method of the class: UriInterface{}

No Hooks.

Returns

static. A new instance with the specified port.

Usage

$UriInterface = new UriInterface();
$UriInterface->withPort( ?int $port ): UriInterface;
?int $port(required)
.

UriInterface::withPort() code WP 7.0

public function withPort(?int $port): UriInterface;