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\ServerDescriptionMongoDB\Driver\ServerDescription::getHost>
^MongoDB\Driver\ServerDescriptionLast updated: Mon, 26 Oct 2026

MongoDB\Driver\ServerDescription::getHelloResponse

(mongodb >=1.13.0)

MongoDB\Driver\ServerDescription::getHelloResponse — Returns the server's most recent "hello" response

Description

final public function MongoDB\Driver\ServerDescription::getHelloResponse(): array

Returns an array of information describing the server. This array is derived from the most recent (at the time the MongoDB\Driver\ServerDescription was constructed) » hello command response obtained through » server monitoring.

Note:

When the driver is connected to a load balancer, this method will return an empty array since load balancers are not monitored. This is in contrast to MongoDB\Driver\Server::getInfo(), which would return the backing server's » hello command response from the initial connection handshake.

Parameters

This function has no parameters.

Return Values

Returns an array of information describing this server.

Errors/Exceptions

See Also


<MongoDB\Driver\ServerDescriptionMongoDB\Driver\ServerDescription::getHost>
^MongoDB\Driver\ServerDescriptionLast updated: Mon, 26 Oct 2026