php8.5
Home/ Manual/ driver / serverdescription/ MongoDB\Driver\ServerDescription::getPort

MongoDB\Driver\ServerDescription::getPort

PHP function Edit on GitHub ✎

(mongodb >=1.13.0)

Returns the port on which this server is listening

Description

MongoDB\Driver\ServerDescription::getPort(): int

Returns the port on which this server is listening.

Parameters Parameters

Return Values

Returns the port on which this server is listening.

Errors/Exceptions

See Also

Source: reference/mongodb/mongodb/driver/serverdescription/getport.xml · from the official PHP manual (php/doc-en)