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)

ce31b299-70a8-49ae-9d86-d1b52e029d16

Best for general purpose use

UUID v7 (Timestamp)

01994267-d507-7001-a923-66f424868c67

Database-optimized sorting

All UUID Versions (Live Generated)

v1 (Time+MAC)
0b72b0b0-9084-11f0-a564-d182ec854ce1
v3 (MD5 Name)
c5e5f349-28ef-3f5a-98d6-0b32ee4d1743
v4 (Random)
e482e3d7-9a4b-4087-9c94-932b2819ce06
v5 (SHA1 Name)
7cb48787-6d91-5b9f-bc60-f30298ea5736
v6 (Reordered)
0b72b2b0-9084-61f0-8a3b-8b841dd9f4e4
v7 (Timestamp)
01994267-d507-701b-a356-f194a570db23
v8 (Custom)
aa35d818-3e1f-8b40-98b1-555721fa9f90
Nil UUID
00000000-0000-0000-0000-000000000000

Next Steps

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