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)

98aac183-c2dd-4a26-bf0a-0b1837828db7

Best for general purpose use

UUID v7 (Timestamp)

019e1efb-48ff-700e-8f62-4b05d00baf96

Database-optimized sorting

All UUID Versions (Live Generated)

v1 (Time+MAC)
4b54ab80-4e6c-11f1-a12e-9f1b9e104ece
v3 (MD5 Name)
c5e5f349-28ef-3f5a-98d6-0b32ee4d1743
v4 (Random)
4d95936f-60a5-4de6-890f-8eabd0f08a0d
v5 (SHA1 Name)
7cb48787-6d91-5b9f-bc60-f30298ea5736
v6 (Reordered)
4b54ada0-4e6c-61f1-addf-7d62d10dbcf2
v7 (Timestamp)
019e1efb-48ff-701d-9152-a93c973caacc
v8 (Custom)
2400c774-4120-8f31-b3cd-939e32e3ff72
Nil UUID
00000000-0000-0000-0000-000000000000

Next Steps

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