webCOMAND

uuid::any_to_hex()

Return a hex UUID from a binary, hex string or string format UUID.

Prototype

string any_to_hex(string $uuid)

Parameters

  • uuid - A string containing valid UUID in binary, hex or string (with dashes) format.

Example

// Convert binary UUID to hex string format
$repo = \comand:repo();
$root = $repo->get_root();
$uuid = \io_comand_util\uuid::any_to_hex($root->UUID);

// Convert string UUID to hex string format
$uuid = '1fbd7537-8c54-11e7-89af-c9df057a5439';
$uuid = \io_comand_util\uuid::any_to_hex($uuid);