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\BSON\Iterator::__constructMongoDB\BSON\Iterator::key>
^MongoDB\BSON\IteratorLast updated: Mon, 26 Oct 2026

MongoDB\BSON\Iterator::current

(mongodb >=1.16.0)

MongoDB\BSON\Iterator::current — Returns the current element

Description

public function MongoDB\BSON\Iterator::current(): mixed

Parameters

This function has no parameters.

Return Values

Returns the value of the current element.

Note:

When encountering a value encoded as 64-bit integer in the BSON structure, the return value of this method will be a MongoDB\BSON\Int64 instance.

Errors/Exceptions

See Also


<MongoDB\BSON\Iterator::__constructMongoDB\BSON\Iterator::key>
^MongoDB\BSON\IteratorLast updated: Mon, 26 Oct 2026