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

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

cxj/uuid
========

A PHP UUID implementation

v1.0.1(10y ago)027BSD-2-ClausePHP

Since Jun 2Pushed 10y ago1 watchersCompare

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

READMEChangelog (2)DependenciesVersions (3)Used By (0)

uuid
====

[](#uuid)

Provides a native PHP implementation of UUID creation.

This class supports version 4 (random) and version 5 (SHA-1) UUID generation algorithms. It generates the DCE 1.1 variant UUID, the most common outside of Microsoft environments.

The UUIDs generated are RFC 4122 compliant.

Introduction
------------

[](#introduction)

### Installation

[](#installation)

This class only requires PHP 4 or later, but we recommend using the latest available version of PHP as a matter of principle. It has no dependencies.

It is installable and autoloadable via Composer as \[cxj/uuid\] ().

Alternatively, \[download a release\] () or clone this repository, then require or include its *autoload.php* file.

### Quality

[](#quality)

This class attempts to comply with [PSR-1](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md), [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md), and [PSR-4](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md). If you notice compliance oversights, please send a patch via pull request.

### Design Goals

[](#design-goals)

This class was designed to cover only the most common use cases, and to be small and lightweight. Hence, there are some features it does not provide.

In particular:

- It does not provide a version 1 (MAC address) implementation, because there is no reliable and lightweight method to obtain the MAC address from PHP. There are also criticisms of version 1 which make it less desirable.
- Version 2 (DCE Security) is also not presently implemented. The need for this version appears small.
- It does not provide a version 3 (MD5) implementation. MD5 has been shown to have weaknesses, and version 5 (SHA-1) is recommended for usage instead.
- It is a UUID generator, so very little UUID parsing and validation is part of the code at present.

Usage
-----

[](#usage)

The UUID generation methods are static, so simply call them as shown below.

```

```

Contributing
------------

[](#contributing)

Pull requests are welcome!

Requests which follow the PSR-1 and PSR-2 coding and style standards, and which have PHPUnit test coverage will get most attention.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~50 days

Total

2

Last Release

3953d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/50b6a3c2702ebb4b00d037d1dea201f293e38e347078dd5dd9bfff970bc02095?d=identicon)[cxj](/maintainers/cxj)

---

Top Contributors

[![cj-clx](https://avatars.githubusercontent.com/u/46033285?v=4)](https://github.com/cj-clx "cj-clx (8 commits)")[![cxj](https://avatars.githubusercontent.com/u/446131?v=4)](https://github.com/cxj "cxj (2 commits)")

---

Tags

uuid

### Embed Badge

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

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

###  Alternatives

[ramsey/uuid

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

12.6k700.2M3.3k](/packages/ramsey-uuid)[symfony/polyfill-uuid

Symfony polyfill for uuid functions

688335.4M63](/packages/symfony-polyfill-uuid)[symfony/uid

Provides an object-oriented API to generate and represent UIDs

610280.0M754](/packages/symfony-uid)[webpatser/laravel-uuid

Laravel integration for webpatser/uuid - High-performance drop-in UUID replacements (15% faster than Ramsey). Provides Str macros, HasUuids trait, facades, and casts. RFC 4122/9562 compliant.

1.8k17.3M129](/packages/webpatser-laravel-uuid)[pascaldevink/shortuuid

PHP 7.4+ library that generates concise, unambiguous, URL-safe UUIDs

5951.8M15](/packages/pascaldevink-shortuuid)[emadadly/laravel-uuid

laravel uuid a simple, automatic UUID generator for any model based on Laravel.

120415.9k3](/packages/emadadly-laravel-uuid)

PHPackages © 2026

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