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)

caf3f7e2-121f-4770-9f73-9afc71710b83

Best for general purpose use

UUID v7 (Timestamp)

019fceb0-f325-7007-a7c3-f646e49d5583

Database-optimized sorting

All UUID Versions (Live Generated)

v1 (Time+MAC)
f39b1d10-904b-11f1-b5d4-2f5b568611c8
v3 (MD5 Name)
c5e5f349-28ef-3f5a-98d6-0b32ee4d1743
v4 (Random)
d36c80de-b74f-4de1-be78-5398bcb0eaa6
v5 (SHA1 Name)
7cb48787-6d91-5b9f-bc60-f30298ea5736
v6 (Reordered)
f39b1e50-904b-61f1-a4f0-377b447f06ca
v7 (Timestamp)
019fceb0-f325-701a-bb1a-710cd79b8e07
v8 (Custom)
e52e4c51-431c-806b-a94c-3cb48c507a39
Nil UUID
00000000-0000-0000-0000-000000000000

Next Steps

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