php8.5
Home/ Manual/ bson / binary/ MongoDB\BSON\Binary::toArray

MongoDB\BSON\Binary::toArray

PHP function Edit on GitHub ✎

(mongodb >=2.2.0)

Returns the vector as an array for a Binary with subtype MongoDB\BSON\Binary::SUBTYPE_VECTOR

Description

MongoDB\BSON\Binary::toArray(): array

Parameters Parameters

Return Values

Returns an array containing the vector data.

Errors/Exceptions

  • Throws MongoDB\Driver\Exception\LogicException if the subtype is not MongoDB\BSON\Binary::SUBTYPE_VECTOR.

See Also

  • MongoDB\BSON\Binary::fromVector
  • BSON Types

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