MongoDB\BSON\Document::offsetExists
PHP function
Edit on GitHub ✎
(mongodb >=1.17.0)
Returns whether a key is present in the document
Description
MongoDB\BSON\Document::offsetExists(mixed $key): bool
Parameters
keyThe key to look for in the document.
Return Values
Returns true if the key is present in the document and false otherwise.
See Also
ArrayAccess::offsetExistsMongoDB\BSON\Document::has