Oihana PHP Arango

bitOr.php

Table of Contents

Functions

bitOr()  : string
Return the bitwise OR of its operands.

Functions

bitOr()

Return the bitwise OR of its operands.

bitOr(string|int|array<string|int, mixed> $values[, string|int|null $value2 = null ]) : string

Wraps the ArangoDB AQL function BIT_OR(), which has two forms:

  • an array of numbers: BIT_OR(numbersArray),
  • two number operands: BIT_OR(value1, value2) (pass $value2).

PHP arrays are emitted as JSON literals; strings are passed through as raw AQL expressions.

Example AQL usage:

BIT_OR([1, 4, 8, 16])   // returns 29
BIT_OR(1, 2)            // returns 3
Parameters
$values : string|int|array<string|int, mixed>

The numbers array, or the first operand when $value2 is given.

$value2 : string|int|null = null

The second operand (selects the two-number form).

Tags
example
use function oihana\arango\db\functions\bit\bitOr;

$expr = bitOr([1, 4, 8, 16]);   // 'BIT_OR([1,4,8,16])'
$expr = bitOr(1, 2);            // 'BIT_OR(1,2)'
see
https://docs.arangodb.com/stable/aql/functions/bit/#bit_or
since
1.1.0
author

Marc Alcaraz

Return values
string

The formatted AQL expression.

On this page

Search results