webCOMAND

uuid::any_to_binary()

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

Prototype

string any_to_binary(string $uuid)

Parameters

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

Example

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

// Convert hex string UUID to binary format
$uuid = '1fbd75378c5411e789afc9df057a5439';
$uuid = \io_comand_util\uuid::any_to_binary($uuid);