Skip to content

JKingweb/DrUUID

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DrUUID

An RFC 4122 (UUID) implementation for PHP.

Usage

DrUUID's API has been designed to be as absolutely simple to use as possible. Generating a UUID is as simple as including the library and issuing a single method call:

<?php
require_once "autoload.php";
use JKingWeb\DrUUID\UUID;
echo UUID::mint();
?>

Compliance

DrUUID fully complies with RFC 4122, and therefore supports Version 1 (time-based), 3 (MD5-based), 4 (random) and 5 (SHA1-based) UUIDs:

<?php
require_once "autoload.php";
use JKingWeb\DrUUID\UUID;
echo UUID::mint(1)."\n";
echo UUID::mint(3, "some identifier", $private_namespace)."\n";
echo UUID::mint(4)."\n";
echo UUID::mint(5, "some identifier", $private_namespace)."\n";

More information

DrUUID includes an extensive and exhaustive HTML manual. A complete break-down of features and their use is available therein.

About

An RFC 4122 (UUID) implementation for PHP.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages