Skip to content

An implementation of twitter's snowflake with C , build in php extension.

License

Notifications You must be signed in to change notification settings

alvinor/pecl_snowflake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snowflake

An implementation of twitter's snowflake with C , build in php extension.

Install

$ git clone https://github.com/alvinor/pecl_snowflake.git
$ cd  pecl_snowflake
$ phpize
$ ./configure 
$ make && make install

Initial

extension = snowflake.so

Functions

snowflake_id(int $work_node = 0)

$work_node: An uniq ID should between 0 and 1023 

Demo

<?php
echo snowflake_id(123);

About

An implementation of twitter's snowflake with C , build in php extension.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published