elcodedocle / uuid
UUID v3, v4, v5 generator class
Installs: 322
Dependents: 2
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:class
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2024-12-21 20:13:29 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 info\synapp\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
-
The OSF, for developing the UUID standards
-
Andrew Moore, the class author (obviously)
Enjoy!