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)

eb9977b5-be29-4dfb-b2ea-6a159be6e980

Best for general purpose use

UUID v7 (Timestamp)

019d12c4-01af-7003-80ae-d3a222116414

Database-optimized sorting

All UUID Versions (Live Generated)

v1 (Time+MAC)
1c0321d0-257f-11f1-9953-ed3ab03bbc86
v3 (MD5 Name)
c5e5f349-28ef-3f5a-98d6-0b32ee4d1743
v4 (Random)
d43a6d94-bde4-434e-9771-29fd6566d9c1
v5 (SHA1 Name)
7cb48787-6d91-5b9f-bc60-f30298ea5736
v6 (Reordered)
1c032310-257f-61f1-981b-1b048d81068b
v7 (Timestamp)
019d12c4-01af-7018-84ee-b222d4af7c44
v8 (Custom)
a131b01e-52bb-82f3-9e4f-e78da59f0603
Nil UUID
00000000-0000-0000-0000-000000000000

Next Steps

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