bitConstruct.php
Table of Contents
Functions
- bitConstruct() : string
- Construct a number with its bits set at the positions given in an array (zero-based).
Functions
bitConstruct()
Construct a number with its bits set at the positions given in an array (zero-based).
bitConstruct(string|array<string|int, mixed> $positions) : string
Wraps the ArangoDB AQL function BIT_CONSTRUCT(positionsArray). It is the inverse of
bitDeconstruct(). A PHP array is emitted as a JSON literal; a string is passed
through as a raw AQL expression.
Example AQL usage:
BIT_CONSTRUCT([1, 2, 3]) // returns 14
Parameters
- $positions : string|array<string|int, mixed>
-
The bit positions to set (array literal or AQL expression).
Tags
Return values
string —The formatted AQL expression.