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

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

nishadil/uuid
=============

A PHP library for generating universally unique identifiers (UUID).

v1.2.0(4mo ago)141MITPHPPHP ^8.0

Since Jul 10Pushed 4mo agoCompare

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

READMEChangelog (5)Dependencies (1)Versions (7)Used By (0)

[![nishadil/uuid](https://avatars.githubusercontent.com/u/3072416?s=25&v=4)](https://avatars.githubusercontent.com/u/3072416?s=25&v=4) nishadil/uuid
====================================================================================================================================================

[](#-nishadiluuid)

 **A PHP library for generating universally unique identifiers (UUID).**

What is a UUID?
---------------

[](#what-is-a-uuid)

A UUID *(short for Universally Unique IDentifier)* ​​is a 36-character alphanumeric string that can be used to identify information. For example, they are commonly used to identify rows of data in database tables, with each row assigned a specific UUID.

Here is an example of a UUID: `acde070d-8c4c-4f0d-9d8a-162843c10333`

One reason UUIDs are so widely used is that they are likely to be globally unique. In other words, not only row UUIDs are unique within a row. A database table is probably the only row with that UUID on any system.

*(Technically it's not impossible that the same UUID you generate could be used elsewhere, but it's highly unlikely as there are 340,282,366,920,938,463,463,374,607,431,768,211,456 possible different UUIDs.)*

UUIDs version status
--------------------

[](#uuids-version-status)

VersionsStatusInfov1`working`UUIDs using date-time and MAC addressv2`working`UUIDs using date-time and MAC address, DCE security version.v3`working`UUIDs based on the MD5 hash of some data.v4`working`UUIDs with random data.v5`working`UUIDs based on the SHA1 hash of some data.v6`working`UUIDs using a timestamp and monotonic counter.v7`working`UUIDs using a Unix timestamp.v8`working`UUIDs using user-defined data.Installation
------------

[](#installation)

This library can be installed using \[Composer\]\[\]. To install, please use following command

```
composer require nishadil/uuid
```

How to use
----------

[](#how-to-use)

Autoload the library once:

```
