webCOMAND

uuid::v3()

Generate and return a Version 3 UUID, which is name based.  They require a namespace (another valid UUID) and a value (the name).  Given the same namespace and name, the output is always the same.  Version 3 UUIDs use an MD5 hashing algorithm internally.

Prototype

string v3(string $namespace, string $name)

Parameters

  • namespace - A valid UUID to use as the namespace.
  • name - Name as a string of text that can be any length.

Example

$repo = \comand::repo();
$root = $repo->get_root();
$namespace = $root->UUID;
$name = 'Unique name';
$new_uuid = \io_comand_util\uuid::v3($namespace, $name);