<?php
use Ramsey\Uuid\Uuid;
$unique = 'YourIdentifierStr';
// Create UUID version 5
$yourUuid = Uuid::uuid5(Uuid::NAMESPACE_DNS, $unique);
dump($yourUuid->toString());
$sameUuid = Uuid::uuid5(Uuid::NAMESPACE_DNS, $unique);
dump($sameUuid->equals($yourUuid));
$differentUuid = Uuid::uuid5(Uuid::NAMESPACE_DNS, 'different');
dump($differentUuid->equals($yourUuid));
// Create UUID version 5
$yourUuidV3 = Uuid::uuid3(Uuid::NAMESPACE_DNS, $unique);
dump($yourUuidV3->equals($yourUuid));
^ "f6de9419-8844-52d7-bf19-9ac23e1532e3"
^ true
^ false
^ false