Oihana PHP Arango

bitToString.php

Table of Contents

Functions

bitToString()  : string
Return the bitstring representation of a number, padded to `bits` characters.

Functions

bitToString()

Return the bitstring representation of a number, padded to `bits` characters.

bitToString(string|int $value, string|int $bits) : string

Wraps the ArangoDB AQL function BIT_TO_STRING(value, bits). It is the inverse of bitFromString().

Example AQL usage:

BIT_TO_STRING(7, 8)   // returns "00000111"
Parameters
$value : string|int

The number to represent.

$bits : string|int

The number of bits (length of the resulting string, 0 … 32).

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

$expr = bitToString(7, 8);   // 'BIT_TO_STRING(7,8)'
see
https://docs.arangodb.com/stable/aql/functions/bit/#bit_to_string
bitFromString()
since
1.1.0
author

Marc Alcaraz

Return values
string

The formatted AQL expression.

On this page

Search results