Download the PHP package webpatser/uuid without Composer
On this page you can find all versions of the php package webpatser/uuid. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download webpatser/uuid
More information about webpatser/uuid
Files in webpatser/uuid
Download webpatser/uuid
More information about webpatser/uuid
Files in webpatser/uuid
Vendor webpatser
Package uuid
Short Description A pure PHP library to generate and validate universally unique identifiers (UUIDs) according to RFC 4122 and RFC 9562 standards. Support for UUID versions 1, 3, 4, 5, 6, 7, and 8.
License MIT
Homepage https://github.com/webpatser/uuid
Package uuid
Short Description A pure PHP library to generate and validate universally unique identifiers (UUIDs) according to RFC 4122 and RFC 9562 standards. Support for UUID versions 1, 3, 4, 5, 6, 7, and 8.
License MIT
Homepage https://github.com/webpatser/uuid
Please rate this library. Is it a good library?
Informations about the package uuid
UUID Library for PHP
A pure PHP library to generate and validate universally unique identifiers (UUIDs) according to RFC 4122 and RFC 9562 standards. Supports UUID versions 1, 3, 4, 5, 6, 7, and 8.
Requirements: PHP ^8.5 (no extensions required)
Installation
Quick Start
API Reference
Generation
| Method | Description |
|---|---|
Uuid::v4() |
Generate random UUID (version 4) |
Uuid::v7() |
Generate time-ordered UUID (version 7) |
Uuid::generate(int $ver, mixed $node = null, ?string $ns = null) |
Generate any version (1, 3, 4, 5, 6, 7, 8) |
Uuid::nil() |
Create nil UUID (all zeros) |
Import & Validation
| Method | Description |
|---|---|
Uuid::import(string $uuid) |
Import a UUID string |
Uuid::validate(mixed $uuid) |
Check if string is valid UUID format |
Uuid::compare(string $a, string $b) |
Compare two UUIDs (case-insensitive) |
Uuid::isNilUuid(mixed $uuid) |
Check if UUID is nil |
Properties
SQL Server GUID Support
SQL Server stores GUIDs with mixed endianness. These methods handle the byte-order conversion:
Benchmarking
Run the benchmark script to compare versions:
Name-Based UUID Namespaces
Features
- UUID versions 1, 3, 4, 5, 6, 7, and 8 (RFC 4122 + RFC 9562)
- SQL Server GUID byte-order conversion
- Monotonic V7 UUIDs with 12-bit sub-millisecond sequence
#[\NoDiscard]attribute on all factory and query methodsarray_first()PHP 8.5 native functionRandom\Randomizerfor cryptographic random bytesreadonlyproperties for immutabilitymatchexpressions for efficient dispatching- ~40% faster than ramsey/uuid on V4, ~45% on V7
- Zero dependencies, pure PHP
License
MIT License.
All versions of uuid with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.5
The package webpatser/uuid contains the following files
Loading the files please wait ...