Oihana PHP Arango

bitTest.php

Table of Contents

Functions

bitTest()  : string
Test whether the bit at the given (zero-based) position is set in a number.

Functions

bitTest()

Test whether the bit at the given (zero-based) position is set in a number.

bitTest(string|int $value, string|int $index) : string

Wraps the ArangoDB AQL function BIT_TEST(value, index).

Example AQL usage:

BIT_TEST(255, 0)   // returns true
BIT_TEST(0, 3)     // returns false
Parameters
$value : string|int

The number to test.

$index : string|int

The zero-based bit position to test.

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

$expr = bitTest(255, 0);   // 'BIT_TEST(255,0)'
see
https://docs.arangodb.com/stable/aql/functions/bit/#bit_test
since
1.1.0
author

Marc Alcaraz

Return values
string

The formatted AQL expression.

On this page

Search results