Change UUIdv4 validation to properly check for version 4 UUIDs

This commit is contained in:
Clemens Schwaighofer
2025-11-04 11:51:08 +09:00
parent c81b602657
commit 7d10b4c5af
2 changed files with 3 additions and 1 deletions

View File

@@ -56,6 +56,8 @@ print "UNIQU ID LONG : " . Uids::uniqIdLong() . "<br>";
$uuidv4 = Uids::uuidv4();
if (!Uids::validateUuuidv4($uuidv4)) {
print "Invalid UUIDv4: " . $uuidv4 . "<br>";
} else {
print "Valid UUIDv4: " . $uuidv4 . "<br>";
}
if (!Uids::validateUuuidv4("foobar")) {
print "Invalid UUIDv4: hard coded<Br>";