2017 © Pedro Peláez
 

library uuid

A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID)

image

duoshuo/uuid

A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID)

  • Sunday, September 21, 2014
  • by shen2
  • Repository
  • 8 Watchers
  • 9 Stars
  • 16,969 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 1 Open issues
  • 1 Versions
  • 4 % Grown

The README.md

uuid

A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID)., (*1)

Dependency

  • PHP 5.4+
  • 64-bit Linux System

Installation

Append dependency into composer.json
    ...
    "require": {
        ...
        "duoshuo/uuid": "dev-master"
    }
    ...

Usage

use Uuid\Uuid;

// At beginning, set your Ethernet Controller MAC address.
Uuid::setMAC('56:84:7a:fe:97:99');

// Version 1
Uuid::now();

// Version 1, first argument is timestamp, second argument is micro seconds.
Uuid::fromTimestamp(1410584506, 792720);

// Version 3
Uuid::fromMd5(md5($string));

// Version 4
Uuid::fromRandom();

// Version 5
Uuid::fromSha1(sha1($string));  

The Versions

21/09 2014

dev-master

9999999-dev

A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID)

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Shen Zhenyu
by Avatar maliemin-Mstar