UUID Library v1.3.0

Installation Guide

webpatser@dev: ~/uuid/1.3.0 $ cat installation.md

Installation - UUID Library v1.3.0

High-performance PHP UUID library generating UUIDs according to RFC 4122 and RFC 9562 standards. 15% faster than Ramsey UUID.

composer require webpatser/uuid

Requirements

  • PHP 8.2 or higher
  • No additional extensions required
  • Pure PHP implementation

Laravel Integration

Using Laravel?
For tight Laravel integration with automatic model UUIDs, migrations, and optimized features, consider using the Laravel UUID package which includes this library with enhanced Laravel-specific functionality. View Laravel UUID Documentation →

Live Interactive Example

UUID v4 (Random)

0b5fc890-91f1-473e-9dc5-bf52f314b137

Best for general purpose use

UUID v7 (Timestamp)

019fce84-bf4e-7004-8c31-65928b7c0225

Database-optimized sorting

All UUID Versions (Live Generated)

v1 (Time+MAC)
34f23580-9045-11f1-939d-917c80c2785b
v3 (MD5 Name)
c5e5f349-28ef-3f5a-98d6-0b32ee4d1743
v4 (Random)
fc2f5e74-144a-452f-b1eb-a3b5e57fd126
v5 (SHA1 Name)
7cb48787-6d91-5b9f-bc60-f30298ea5736
v6 (Reordered)
34f236b0-9045-61f1-95c6-614cf298ce2b
v7 (Timestamp)
019fce84-bf4e-701e-ac93-7b2a52be5c12
v8 (Custom)
6ed3e6ae-54dc-8a84-ad39-06afa7814d51
Nil UUID
00000000-0000-0000-0000-000000000000

Next Steps

Explore the UUID library features and generate different UUID types interactively with the examples above.