2017 © Pedro Peláez
 

library ulid

Universally Unique Lexicographically Sortable Identifier

image

tuupola/ulid

Universally Unique Lexicographically Sortable Identifier

  • Wednesday, May 2, 2018
  • by tuupola
  • Repository
  • 1 Watchers
  • 1 Stars
  • 208 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

[WIP] PHP ULID

This library implements the Universally Unique Lexicographically Sortable Identifier from Alizain Feerasta., (*1)

Latest Version Software License Build Status Coverage, (*2)

Install

Install with composer., (*3)

``` bash $ composer require tuupola/ulid, (*4)


## Usage ``` php use Tuupola\Ulid; $ulid = new Ulid; print $ulid; /* 0001DD70YKYBES1P98DHWKTWZW */ //$ulid = ulid::fromString("0o5Fs0EELR0fUjHjbCnEtdUwQe3"); print $ulid->timestamp(); /* 1523811283 */ print bin2hex($ulid->payload()); /* f2dd90d9286c793d73fc */ $datetime = (new \DateTimeImmutable) ->setTimestamp($ulid->unixtime()) ->setTimeZone(new \DateTimeZone("UTC")); print $datetime->format("Y-m-d H:i:s"); /* 2018-04-15 16:54:43 */

Testing

You can run tests either manually or automatically on every code change. Automatic tests require entr to work., (*5)

``` bash $ composer test, (*6)


``` bash $ brew install entr $ composer watch

Contributing

Please see CONTRIBUTING for details., (*7)

Security

If you discover any security related issues, please email tuupola@appelsiini.net instead of using the issue tracker., (*8)

License

The MIT License (MIT). Please see License File for more information., (*9)

The Versions

02/05 2018

dev-master

9999999-dev https://github.com/tuupola/ulid

Universally Unique Lexicographically Sortable Identifier

  Sources   Download

MIT

The Requires

 

The Development Requires

ulid

15/04 2018

0.1.0

0.1.0.0 https://github.com/tuupola/ulid

Universally Unique Lexicographically Sortable Identifier

  Sources   Download

MIT

The Requires

 

The Development Requires

ulid