PHP UUID v4, v3 or v5, v1 Generator: Generate unique identifiers according to RFC 4122

Recommend this page to a friend!
  Info   View files Documentation   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2021-01-04 (17 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 61 This week: 8All time: 9,835 This week: 22Up
Version License PHP version Categories
abmmhasan-uuid 1.0.3Custom (specified...7Text processing, PHP 7
Description Author

This class can generate unique identifiers according to RFC 4122.

It can generate strings with unique values implementing the RFC 4122 specification in several variants. Currently it can generate:

- Variant 1 using a time based node value
- Variant 4 completely random
- Variant 3 or 5 based on a prefix and a type of identifier to generate

Picture of A. B. M. Mahmudul Hasan
  Performance   Level  
Name: A. B. M. Mahmudul Hasan <contact>
Classes: 3 packages by
Country: Bangladesh Bangladesh
Age: 30
All time rank: 427751 in Bangladesh Bangladesh
Week rank: 3 Up1 in Bangladesh Bangladesh Up



License: MIT

UUID (v1, v3-v5) Generator (RFC4122)


Language: PHP 7.1/+


composer require abmmhasan/uuid



* Get v1 UUID (Time based)

* Get generated node, for further use
$node = \AbmmHasan\Uuid::getNode();

* Pass your pre-generated node (for node specific UUID)


* Get v4 UUID (completely random)

v3 & v5

* Get v3 or v5 UUID for 'TestString' (default X500 namespace)
// or

* Get v3 or v5 UUID for an URL & pre-defined namespace
* You can pass X500, URL, OID, DNS (check RFC4122 #Appendix C)
// or

* You can generate a random UUID & use as namespace as well
// or


* Not supported! 


Having trouble? Create an issue!

  Files folder image Files  
File Role Description
Files folder imagesrc (1 file)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file Doc. Documentation

  Files folder image Files  /  src  
File Role Description
  Plain text file Uuid.php Class Class source

 Version Control Unique User Downloads Download Rankings  
This week:8
All time:9,835
This week:22Up

For more information send a message to info at phpclasses dot org.