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)

433e4651-892a-44ae-9185-74d85e170035

Best for general purpose use

UUID v7 (Timestamp)

01a0b938-d3e7-7007-8fad-90467108dd51

Database-optimized sorting

All UUID Versions (Live Generated)

v1 (Time+MAC)
4f56cb60-b415-11f1-b3b6-dd5da08cf41a
v3 (MD5 Name)
c5e5f349-28ef-3f5a-98d6-0b32ee4d1743
v4 (Random)
9973a0a3-1fcf-48fb-b9cb-24bdc19e5eec
v5 (SHA1 Name)
7cb48787-6d91-5b9f-bc60-f30298ea5736
v6 (Reordered)
4f56cc90-b415-61f1-adc0-73ccd076089d
v7 (Timestamp)
01a0b938-d3e7-701e-b5ac-38fd1afd20d6
v8 (Custom)
518df97a-15eb-8a94-84af-2c33a59c55d9
Nil UUID
00000000-0000-0000-0000-000000000000

Next Steps

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