Repolode
ramsey

ramsey/uuid

A PHP library for generating and working with universally unique identifiers (UUIDs).

Stars
12,632
Forks
533
Open issues
28
Last commit
2 months ago

What is it?

ramsey/uuid is a PHP library for creating and handling UUIDs, the 128-bit identifiers used to label records, requests and objects without needing a central counter. It is installed through Composer and is intended for PHP applications that need identifiers which are unique across systems.

The library is modeled on the UUID libraries in Java and Python, and it covers the common work around identifiers: generating new values, parsing and validating existing strings, and comparing or converting them. Version 4 is the current major release, and the project provides an upgrade guide for moving from version 3.

Full documentation, examples and frequently asked questions are published on the project's documentation site.

Key features

  • 01Generates UUIDs through Composer-installed PHP code.
  • 02Parses, validates and compares existing UUID strings.
  • 03Modeled on the Java and Python UUID libraries.
  • 04Includes an upgrade guide from version 3 to version 4.

Use cases

  • Assigning unique primary keys to database records in a PHP application.
  • Generating identifiers for API resources or distributed requests.
  • Validating UUID strings received from clients or external systems.

Quick start

  1. 1

    Install the package with Composer

    composer require ramsey/uuid

Topics

#uuid#php#identifiers#composer#guid#php8#uid

FAQ

What is uuid?
A PHP library for generating and working with universally unique identifiers (UUIDs). ramsey/uuid is a PHP library for creating and handling UUIDs, the 128-bit identifiers used to label records, requests and objects without needing a central counter. It is installed through Composer and is intended for PHP applications that need identifiers which are unique across systems.
Is uuid free to use? What license does it have?
uuid is open source under the MIT license. Check the license terms before using it in commercial products.
Is uuid still maintained?
Updated within 6 months. The last commit to uuid was on Sep 17, 2026.
What can I use uuid for?
Assigning unique primary keys to database records in a PHP application. Generating identifiers for API resources or distributed requests. Validating UUID strings received from clients or external systems.
How do I install uuid?
Install the package with Composer: composer require ramsey/uuid
Where can I get uuid?
The source code and installation instructions are on GitHub: https://github.com/ramsey/uuid

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects