Uuid
Namespaces
Interfaces, Classes and Traits
- UuidFactoryInterface
- UuidFactoryInterface defines common functionality all `UuidFactory` instances must implement
- UuidInterface
- UuidInterface defines common functionality for all universally unique identifiers (UUIDs)
- BinaryUtils
- Provides binary math utilities
- DegradedUuid
- DegradedUuid represents an RFC 4122 UUID on 32-bit systems
- FeatureSet
- FeatureSet detects and exposes available features in the current environment (32- or 64-bit, available dependencies, etc.)
- Uuid
- Represents a universally unique identifier (UUID), according to RFC 4122.
- UuidFactory
Table of Contents
- v1() : string
- Generate a version 1 UUID from a host ID, sequence number, and the current time.
- v3() : string
- Generate a version 3 UUID based on the MD5 hash of a namespace identifier (which is a UUID) and a name (which is a string).
- v4() : string
- Generate a version 4 (random) UUID.
- v5() : string
- Generate a version 5 UUID based on the SHA-1 hash of a namespace identifier (which is a UUID) and a name (which is a string).
Functions
v1()
Generate a version 1 UUID from a host ID, sequence number, and the current time.
v1([int|string|null $node = null ][, int|null $clockSeq = null ]) : string
Parameters
- $node : int|string|null = null
-
A 48-bit number representing the hardware address This number may be represented as an integer or a hexadecimal string.
- $clockSeq : int|null = null
-
A 14-bit number used to help avoid duplicates that could arise when the clock is set backwards in time or if the node ID changes.
Tags
Return values
string —v3()
Generate a version 3 UUID based on the MD5 hash of a namespace identifier (which is a UUID) and a name (which is a string).
v3(string|UuidInterface $ns, string $name) : string
Parameters
- $ns : string|UuidInterface
-
The UUID namespace in which to create the named UUID
- $name : string
-
The name to create a UUID for
Tags
Return values
string —v4()
Generate a version 4 (random) UUID.
v4() : string
Tags
Return values
string —v5()
Generate a version 5 UUID based on the SHA-1 hash of a namespace identifier (which is a UUID) and a name (which is a string).
v5(string|UuidInterface $ns, string $name) : string
Parameters
- $ns : string|UuidInterface
-
The UUID namespace in which to create the named UUID
- $name : string
-
The name to create a UUID for