Skip to content
Advertisement

Where can I find a php lib for generating time-based (v1) UUID? [closed]

Where can I find a php lib for generating time-based (v1) UUID?

Thanks in advance!

Advertisement

Answer

I assume you want something like this:

E.g.:

require_once('class.uuid.php');
$str = UUID::generate(UUID::UUID_TIME, UUID::FMT_STRING, "abcdef");
echo $str;
// Output: 1b55e723-578b-4e34-d5cf-616263646566
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement