MongoDB\BSON\PackedArray::offsetExists

Returns whether a index is present in the array

Description

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

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