nishadil / uuid
A PHP library for generating universally unique identifiers (UUID).
Requires
- php: ^8.0
This package is not auto-updated.
Last update: 2024-09-27 00:21:18 UTC
README
A PHP library for generating universally unique identifiers (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
Installation
This library can be installed using [Composer][]. To install, please use following command
composer require nishadil/uuid
How to use
<?php
require __DIR__.'/vendor/autoload.php';
use Nishadil\Uuid\Uuid;
echo Uuid::v1()->get();
?>
License
This library is licensed for use under the MIT License (MIT)