bitNegate.php
Table of Contents
Functions
- bitNegate() : string
- Return the bitwise negation of a number, keeping up to `bits` bits.
Functions
bitNegate()
Return the bitwise negation of a number, keeping up to `bits` bits.
bitNegate(string|int $value, string|int $bits) : string
Wraps the ArangoDB AQL function BIT_NEGATE(value, bits).
Example AQL usage:
BIT_NEGATE(0, 8) // returns 255
BIT_NEGATE(255, 8) // returns 0
Parameters
- $value : string|int
-
The number to negate.
- $bits : string|int
-
The number of bits to keep (0 … 32).
Tags
Return values
string —The formatted AQL expression.