1.2.1615. ext/uuid¶
Extension UUID
. A universally unique identifier (UUID) is a 128-bit number used to identify information in computer systems.
An interface to the libuuid system library. The libuuid library is used to generate unique identifiers for objects that may be accessible beyond the local system. The Linux implementation was created to uniquely identify ext2 filesystems created by a machine. This library generates UUIDs compatible with those created by the Open Software Foundation (OSF) Distributed Computing Environment (DCE) utility uuidgen.
<?php
// example from the test suitee of the extension.
// check basic format of generated UUIDs
$uuid = uuid_create();
if (preg_match("/[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}/", $uuid)) {
echo "basic format ok\n";
} else {
echo "basic UUID format check failed, generated UUID was $uuid\n";
}
?>
See also libuuid and ext/uuid.
1.2.1615.1. Specs¶
Short name |
Extensions/Extuuid |
Rulesets |
|
Exakat since |
1.7.9 |
PHP Version |
All |
Severity |
|
Time To Fix |
|
Precision |
Very high |
Available in |