Registry / utility / godruoyi-php-snowflake

godruoyi-php-snowflake

JSON →
library3.2.3phppackagistunverified

An ID Generator for PHP based on Snowflake Algorithm (Twitter announced).

composer require godruoyi/php-snowflake
INSTALL
IMPORT
SIG · GODRUOYI-PHP-SNOWF
G
godruoyi-php-snowflake
utilityphpv3.2.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Snowflake
use Godruoyi\Snowflake\Snowflake;

Generate a unique ID using the Snowflake algorithm

use Godruoyi\Snowflake\Snowflake; $snowflake = new Snowflake(); echo $snowflake->id();
Debug
Known issues
breakingRequires PHP 7.2+ and the BCMath extension for large integer arithmetic.
fix
Install the BCMath extension or use a compatible PHP version.
affects: >=3.0.0
Upgrade
Version history
3.2.3latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
godruoyi-php-snowflake — pip install godruoyi-php-snowflake · libregistry