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)

4c86ed4c-997a-4db9-8fc0-49f57485a1d4

Best for general purpose use

UUID v7 (Timestamp)

019d1219-957c-7009-9185-43ed4df871cb

Database-optimized sorting

All UUID Versions (Live Generated)

v1 (Time+MAC)
1ae08350-2565-11f1-b4e0-c33f6575fa96
v3 (MD5 Name)
c5e5f349-28ef-3f5a-98d6-0b32ee4d1743
v4 (Random)
96d3d49e-9d40-44dc-8cde-73bafee23289
v5 (SHA1 Name)
7cb48787-6d91-5b9f-bc60-f30298ea5736
v6 (Reordered)
1ae084a0-2565-61f1-af0a-519818d03668
v7 (Timestamp)
019d1219-957c-7010-ae0b-aa4d48d509e5
v8 (Custom)
f88eae42-8ba2-8d5d-a06e-b2f39a1afd9d
Nil UUID
00000000-0000-0000-0000-000000000000

Next Steps

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