PHPackages                             sinevia/php-library-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. sinevia/php-library-uid

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

sinevia/php-library-uid
=======================

PHP Library Uid

v1.8.0(7y ago)82.4k34proprietaryPHP

Since Jan 6Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Sinevia/php-library-uid)[ Packagist](https://packagist.org/packages/sinevia/php-library-uid)[ Docs](http://github.com/sinevia/php-library-uid)[ RSS](/packages/sinevia-php-library-uid/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)DependenciesVersions (6)Used By (4)

PHP Library Uid
===============

[](#php-library-uid)

Class to generate unique identifying strings. Largest attention is paid on human friendly unique identifiers (dated digits).

[![No Dependencies](https://camo.githubusercontent.com/e5650883bec05bec967678c8203c32b160b75c93b5b745c80bd9e6f25eb4a3db/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6e6f2d646570656e64656e636965732d737563636573732e737667)](https://camo.githubusercontent.com/e5650883bec05bec967678c8203c32b160b75c93b5b745c80bd9e6f25eb4a3db/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6e6f2d646570656e64656e636965732d737563636573732e737667)

Supported UID Type
------------------

[](#supported-uid-type)

It supports several types of unique identifiers. The type you may want to use depends on how random and long you want the identifier to be. For most of the user cases a Micro UUID (20 chars) should be fine. A human UUID (32 chars) should almost never be used where a human is involved as too "mind bogling" to work with.

- Human UUID (32 digits)

    Format: YYYYMMDD-HHMM-SSMM-MMMMRRRRRRRRRRR

    2017111908492665991498485465 (with dashes: 20171119-0849-2665-991498485465)
- Nano UID (23 digits)

    Format: YYYYMMDD-HHMMSS-MMMMMM-NNN

    Examples:

    20171119084926659914984 (with dashes: 20171119-084926-659914-984)
- Micro UID (20 digits)

    Format: YYYYMMDD-HHMMSS-MMMMMM

    Examples:

    20171119084926659914 (with dashes: 20171119-084926-659914)
- Seconds UID (14 digits)

    Format: YYYYMMDD-HHMMSS

    Examples:

    20171119084926 (with dashes: 20171119-084926)
- Timestamp UID (Unix Time - seconds since 1 Jan 1970)

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

[](#installation)

Via composer

```
composer require sinevia/php-library-uid
```

Usage
-----

[](#usage)

```
\Sinevia\Uid::humanUuid();       // 32 digits - YYYYMMDD-HHMM-SSMM-MMMMRRRRRRRRRRR
\Sinevia\Uid::nanoUid();         // 23 digits - YYYYMMDD-HHMMSS-MMMMMM-NNN
\Sinevia\Uid::microUid();        // 20 digits - YYYYMMDD-HHMMSS-MMMMMM
\Sinevia\Uid::secUid();          // 14 digits - YYYYMMDD-HHMMSS
\Sinevia\Uid::timestampUid();    // Unix time (seconds since 1 Jan 1970)

\Sinevia\Uid::timestampUidWithRandomPostFix(12); // Unix time + 12 random digits

\Sinevia\Uid::isHumanUid(1);
\Sinevia\Uid::isNanoUid(1);
\Sinevia\Uid::isMicroUid(1);
\Sinevia\Uid::isSecUid(1);
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~119 days

Total

5

Last Release

2578d ago

### Community

Maintainers

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

---

Top Contributors

[![Sinevia](https://avatars.githubusercontent.com/u/3450815?v=4)](https://github.com/Sinevia "Sinevia (17 commits)")

---

Tags

phplibraryUIDsinevia

### Embed Badge

![Health badge](/badges/sinevia-php-library-uid/health.svg)

```
[![Health](https://phpackages.com/badges/sinevia-php-library-uid/health.svg)](https://phpackages.com/packages/sinevia-php-library-uid)
```

PHPackages © 2026

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