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)

eefa055c-7377-4f68-a01a-aeaf79033c0f

Best for general purpose use

UUID v7 (Timestamp)

019f6b5d-8c02-7001-b4c3-3010652e762a

Database-optimized sorting

All UUID Versions (Live Generated)

v1 (Time+MAC)
09ae6ee0-8124-11f1-9dfb-8f05662ae9a3
v3 (MD5 Name)
c5e5f349-28ef-3f5a-98d6-0b32ee4d1743
v4 (Random)
cce0d01a-c6e6-417e-bbd2-f130abb2c3e9
v5 (SHA1 Name)
7cb48787-6d91-5b9f-bc60-f30298ea5736
v6 (Reordered)
09ae7020-8124-61f1-b201-f1eb5188b020
v7 (Timestamp)
019f6b5d-8c02-7010-b842-3a5cfb980bd8
v8 (Custom)
3b75310b-eb93-8230-bb8a-6ba884cb9d5f
Nil UUID
00000000-0000-0000-0000-000000000000

Next Steps

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