php8.5
Home/ Manual/ bson / packedarray/ MongoDB\BSON\PackedArray::offsetExists

MongoDB\BSON\PackedArray::offsetExists

PHP function Edit on GitHub ✎

(mongodb >=1.17.0)

Returns whether a index is present in the array

Description

MongoDB\BSON\PackedArray::offsetExists(mixed $key): bool

Parameters

key

The index to look for in the array.

Return Values

Returns true if the index is present in the array and false otherwise.

See Also

  • ArrayAccess::offsetExists
  • MongoDB\BSON\PackedArray::has

Source: reference/mongodb/bson/packedarray/offsetexists.xml · from the official PHP manual (php/doc-en)