This package to generate 64 bit identifier, use snowflakes from Twitter.
src/
tests/
Via Composer
$ composer require yiranzai/snowflake$id = \Yiranzai\SnowFlake\SnowFlake::next($dataCenterId = 1, $workerId = 2);
$node = \Yiranzai\SnowFlake\SnowFlake::analysis($id);
echo $node->dataCenterID; // 1
echo $node->workerID; // 2Please see CHANGELOG for more information on what has changed recently.
$ composer testPlease see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.
