Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<MongoDB\Driver\Monitoring\ServerOpeningEvent::getHostMongoDB\Driver\Monitoring\ServerOpeningEvent::getTopologyId>
^MongoDB\Driver\Monitoring\ServerOpeningEventLast updated: Mon, 26 Oct 2026

MongoDB\Driver\Monitoring\ServerOpeningEvent::getPort

(mongodb >=1.13.0)

MongoDB\Driver\Monitoring\ServerOpeningEvent::getPort — Returns the port on which this server is listening

Description

final public function MongoDB\Driver\Monitoring\ServerOpeningEvent::getPort(): int

Parameters

This function has no parameters.

Return Values

Returns the port on which this server is listening.

Errors/Exceptions


<MongoDB\Driver\Monitoring\ServerOpeningEvent::getHostMongoDB\Driver\Monitoring\ServerOpeningEvent::getTopologyId>
^MongoDB\Driver\Monitoring\ServerOpeningEventLast updated: Mon, 26 Oct 2026