toHex.php
Table of Contents
Functions
- toHex() : string
- Return the hexadecimal representation of a value.
Functions
toHex()
Return the hexadecimal representation of a value.
toHex(string $value) : string
This helper wraps the ArangoDB AQL function TO_HEX(value) which converts
the input value to its hexadecimal string representation. This is useful for
encoding binary data or converting numbers to hex format.
Example AQL usage:
TO_HEX("hello") // returns "68656c6c6f"
TO_HEX("world") // returns "776f726c64"
TO_HEX(doc.data) // returns hexadecimal representation of data
Parameters
- $value : string
-
String expression to convert to hexadecimal.
Tags
Return values
string —The formatted AQL expression.