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)

c3bfe759-0f18-4581-bf47-7f4aa9306613

Best for general purpose use

UUID v7 (Timestamp)

01a1a2bc-725c-7005-a729-07f2cf38dbec

Database-optimized sorting

All UUID Versions (Live Generated)

v1 (Time+MAC)
f4b483e0-d7b6-11f1-ac46-f9bc1ba302a0
v3 (MD5 Name)
c5e5f349-28ef-3f5a-98d6-0b32ee4d1743
v4 (Random)
376575ac-4134-46db-9ac2-35b6b7bf16ce
v5 (SHA1 Name)
7cb48787-6d91-5b9f-bc60-f30298ea5736
v6 (Reordered)
f4b484c0-d7b6-61f1-a0f0-c79188adb430
v7 (Timestamp)
01a1a2bc-725c-7011-8f24-06d3aa2fc8af
v8 (Custom)
77ef9381-c046-814d-aff6-3a43d66e143b
Nil UUID
00000000-0000-0000-0000-000000000000

Next Steps

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