PHPackages                             infocyph/uid - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. infocyph/uid

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

infocyph/uid
============

UUID (RFC 9562), ULID, Snowflake ID, Sonyflake ID, and TBSL generator for PHP.

4.2.1(1mo ago)116.0k↑31.3%MITPHPPHP &gt;=8.2CI passing

Since Apr 22Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/infocyph/UID)[ Packagist](https://packagist.org/packages/infocyph/uid)[ RSS](/packages/infocyph-uid/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)Dependencies (7)Versions (25)Used By (0)

UID
===

[](#uid)

[![Security & Standards](https://github.com/infocyph/UID/actions/workflows/security-standards.yml/badge.svg)](https://github.com/infocyph/UID/actions/workflows/security-standards.yml)[![Documentation](https://camo.githubusercontent.com/86bc9025ddb9619fa4a19d1eb9d8a2a38c8cc6d86c7aae6d0cd71e2a15862edc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f63756d656e746174696f6e2d5549442d626c75653f6c6f676f3d72656164746865646f6373266c6f676f436f6c6f723d7768697465)](https://docs.infocyph.com/projects/UID/)[![Packagist Downloads](https://camo.githubusercontent.com/307edbd2436c6755475f0f0fe200cdebdbb5fb6fa396c4abde5b8ab30e8f3e54/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e666f637970682f5549443f636f6c6f723d677265656e266c696e6b3d68747470732533412532462532467061636b61676973742e6f72672532467061636b61676573253246696e666f63797068253246554944)](https://camo.githubusercontent.com/307edbd2436c6755475f0f0fe200cdebdbb5fb6fa396c4abde5b8ab30e8f3e54/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f696e666f637970682f5549443f636f6c6f723d677265656e266c696e6b3d68747470732533412532462532467061636b61676973742e6f72672532467061636b61676573253246696e666f63797068253246554944)[![License: MIT](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](https://opensource.org/licenses/MIT)[![Packagist Version](https://camo.githubusercontent.com/3d8454690902f00342941f6a84f1e5fcc0880aca91da3bf31f1c3b3b237eb72c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e666f637970682f554944)](https://camo.githubusercontent.com/3d8454690902f00342941f6a84f1e5fcc0880aca91da3bf31f1c3b3b237eb72c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f696e666f637970682f554944)[![Packagist PHP Version](https://camo.githubusercontent.com/589b1619202f9a4fbee32fb21ad8e99da4995e3a4f6bedb1f7d2a3306d2fcc40/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f696e666f637970682f5549442f706870)](https://camo.githubusercontent.com/589b1619202f9a4fbee32fb21ad8e99da4995e3a4f6bedb1f7d2a3306d2fcc40/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f696e666f637970682f5549442f706870)[![GitHub Code Size](https://camo.githubusercontent.com/093ce9f34f4ca32d8bd17fb9a480f9eaa3a467f2b881041a1e05d4ae2ff75b6b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f696e666f637970682f554944)](https://camo.githubusercontent.com/093ce9f34f4ca32d8bd17fb9a480f9eaa3a467f2b881041a1e05d4ae2ff75b6b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f696e666f637970682f554944)

All-in-one unique ID toolkit for PHP.

Features
--------

[](#features)

- UUID (`v1`, `v3`, `v4`, `v5`, `v6`, `v7`, `v8`)
- ULID (monotonic and random modes)
- Snowflake, Sonyflake, TBSL
- Randflake (encrypted 64-bit IDs with lease-bound node windows)
- NanoID, CUID2, KSUID, XID
- Opaque and deterministic IDs
- Value objects and comparator utilities
- Binary conversion and base encoders (`16`, `32`, `36`, `58`, `62`)
- Pluggable sequence providers (filesystem, memory, PSR-16 cache, callback)

Requirements
------------

[](#requirements)

- PHP `>=8.2`
- `ext-bcmath`

Installation
------------

[](#installation)

```
composer require infocyph/uid
```

Global helper functions are autoloaded via `src/functions.php`.

Quick Usage
-----------

[](#quick-usage)

```
