# unid **Repository Path**: zmzmzm/unid ## Basic Information - **Project Name**: unid - **Description**: unid是一个可以生成唯一ID的php扩展,此扩展基于“雪花算法” - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: https://github.com/liexusong/unid - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2016-08-25 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # unid PHP unique ID generator, based on the Twitter Snowflake algorithm! functions list: --------------- ```php // 1) Get the next unique ID. string unid_next_id(void); // 2) Change unique ID to time stamp. int unid_get_time(string id); // 3) Change unique ID to worker id. array unid_get_worker_id(string id); ``` example: -------- ```php ``` install: --------

$  cd ./unid
$  phpize
$  ./configure
$  make
$  sudo make install
php.ini configure entries: --------------------------

[unid]
unid.datacenter = 1
unid.twepoch = "2016-07-01 00:00:00"