定制 tuupola/ulid 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tuupola/ulid

最新稳定版本:0.2.0

Composer 安装命令:

composer require tuupola/ulid

包简介

Universally Unique Lexicographically Sortable Identifier

关键字:

README 文档

README

This library implements the Universally Unique Lexicographically Sortable Identifier from Alizain Feerasta.

Latest Version Software License Build Status Coverage

Install

Install with composer.

$ composer require tuupola/ulid

Usage

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.

$ composer test
$ brew install entr
$ composer watch

Contributing

Please see CONTRIBUTING for details.

Security

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

License

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

统计信息

  • 总下载量: 9.82k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-04-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固