php8.5
Home/ Manual/ driver / cursorinterface/ MongoDB\Driver\CursorInterface::getId

MongoDB\Driver\CursorInterface::getId

PHP function Edit on GitHub ✎

(mongodb >=1.6.0)

Returns the ID for this cursor

Description

MongoDB\Driver\CursorInterface::getId(): MongoDB\BSON\Int64

Returns the ID for this cursor, which uniquely identifies the cursor on the server.

Parameters Parameters

Return Values

Returns the ID for this cursor.

Errors/Exceptions

Changelog

VersionDescription
PECL mongodb 1.20.0Added MongoDB\BSON\Int64 to the tentative return type for this method. MongoDB\Driver\CursorId will be removed from the return type in version 2.0.

See Also

  • MongoDB\Driver\Cursor::getId
  • MongoDB\Driver\CursorId
  • MongoDB\BSON\Int64

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