Skip to content

zhouyuan24/IDWork

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

IDWork

Twitter的 Snowflake的PHP版

示例

<?php

require "IdWork.php";

$node_id = rand(1, 1023);//随机数
$id = IdWork::getInstance()->setWorkId($node_id)->nextId();
echo $id;

输出:

1187992118450290688

注:不支持Windows系统。

About

Twitter的 Snowflake的PHP版

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages