PHPackages                             uuid-v9/uuid-v9 - 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. uuid-v9/uuid-v9

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

uuid-v9/uuid-v9
===============

Fast, lightweight, zero-dependency PHP implementation of UUID version 9

01PHP

Since Nov 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/jhuntdev/uuidv9-php)[ Packagist](https://packagist.org/packages/uuid-v9/uuid-v9)[ RSS](/packages/uuid-v9-uuid-v9/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

UUID v9
=======

[](#uuid-v9)

Fast, lightweight, zero-dependency PHP implementation of UUID version 9
-----------------------------------------------------------------------

[](#fast-lightweight-zero-dependency-php-implementation-of-uuid-version-9)

The v9 UUID supports both sequential (time-based) and non-sequential (random) UUIDs with an optional prefix of up to four bytes, an optional checksum, and sufficient randomness to avoid collisions. It uses the UNIX timestamp for sequential UUIDs and CRC-8 for checksums. A version digit can be added if desired, but is omitted by default.

To learn more about UUID v9, please visit the website:

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

[](#installation)

Install UUID v9 with Composer

```
composer require uuid-v9/uuid-v9
```

Usage
-----

[](#usage)

```
require __DIR__ . '/vendor/autoload.php';

use UUIDv9\UUIDv9\UUIDv9;

$orderedId = UUIDv9();
$prefixedOrderedId = UUIDv9(['prefix' => 'a1b2c3d4']);
$unorderedId = UUIDv9(['timestamp' => false]);
$prefixedUnorderedId = UUIDv9(['prefix' => 'a1b2c3d4', 'timestamp' => false]);
$orderedIdWithChecksum = UUIDv9(['checksum' => true]);
$orderedIdWithVersion = UUIDv9(['version' => true]);
$orderedIdWithLegacyMode = UUIDv9(['legacy' => true]);

$isValid = IsValidUuidV9($orderedId);
$isValidWithChecksum = IsValidUuidV9($orderedIdWithChecksum, ['checksum' => true]);
$isValidWithVersion = IsValidUuidV9($orderedIdWithVersion, ['version' => true]);
```

Backward Compatibility
----------------------

[](#backward-compatibility)

Some UUID validators check for specific features of v1 or v4 UUIDs. This causes some valid v9 UUIDs to appear invalid. Three possible workarounds are:

1. Use the built-in validator (recommended)
2. Use legacy mode\*
3. Bypass the validator (not recommended)

*\*Legacy mode adds version and variant digits to immitate v1 or v4 UUIDs depending on the presence of a timestamp.*

License
-------

[](#license)

This project is licensed under the [MIT License](LICENSE).

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/afc2f62b990f21f8ef75356c9f310b79cdebfe51745967a80bb8b34d6898aa67?d=identicon)[jhuntdev](/maintainers/jhuntdev)

---

Tags

phpuuidv9

### Embed Badge

![Health badge](/badges/uuid-v9-uuid-v9/health.svg)

```
[![Health](https://phpackages.com/badges/uuid-v9-uuid-v9/health.svg)](https://phpackages.com/packages/uuid-v9-uuid-v9)
```

###  Alternatives

[voku/phonetic-algorithms

Phonetic-Algorithms for fuzzy searching | PHP

1738.4k1](/packages/voku-phonetic-algorithms)[oriondevelops/filament-greeter

A Filament plugin to greet your users.

1214.3k1](/packages/oriondevelops-filament-greeter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
