UUID v3, v4, v5 generator class

1.0.0 2018-02-19 12:58 UTC

This package is not auto-updated.

Last update: 2019-12-13 14:30:24 UTC


README

#####Universal Unique Identifier v3, v4 and v5 generator Copyright: The PHP Documentation Group
License: Creative Commons Attribution 3.0 License

How to use

use synapp\info\tools\uuid\uuid;

require_once 'vendor/elcodedocle/uuid/uuid.php';

//Named-based UUID:
$v3uuid = uuid::v3(uuid::v4(), 'BlahBlahSomeRandomStringBlergBlorg');
$v5uuid = uuid::v5(uuid::v4(), 'BlahBlahSomeRandomStringBlergBlorg');

//Pseudo-random UUID:
$v4uuid = uuid::v4();

echo 'UUIDv3: '.$v3uuid."\n".'UUIDv4: '.$v4uuid."\n".'UUIDv5: '.$v5uuid."\n";

Motivation

I needed a UUID generator I could import as a dependency on my projects, so I took the one from the PHP manual, added a composer.json and this README.md and uploaded it to this repo.

Acks

Enjoy!