Stars: 131
Forks: 28
Pull Requests: 8
Issues: 8
Watchers: 7
Last Updated: 2022-02-16 18:33:36
64 bit ID Generator
License: MIT License
Languages: PHP
For high availability within and across data centers, machines generating ids should not have to coordinate with each other.
You should use NTP to keep your system clock accurate.
Change const EPOCH in particle class to today epoch time w/ millisecond (13 digits)
$machineID = 0; // Machine ID (aka Server ID no.)
Particle::generateParticle($machineID);
$particleID = '4611692470816737853';
Particle::timeFromParticle($particleID);