Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Distributed ID generation in *PHP* for the lazy.

License

Notifications You must be signed in to change notification settings

michaelcontento/simpleflake-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

simpleflake-PHP

Travis Status: Build Status

Distributed ID generation in PHP for the lazy. Based on the awesome python implementation from SawdustSoftware.

You can read an overview of what this does and why it came into being at the Sawdust Software Blog.

Usage

<?php

require "simpleflake.php";

$newId = \simpleflake\generate();
echo "ID: $newId\n";

$parts = \simpleflake\parse($newId);
echo "Timestamp:  " . $parts["timestamp"] . "\n";
echo "RandomBits: " . $parts["randomBits"] . "\n";

About

Distributed ID generation in *PHP* for the lazy.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages