Atom
PHP unique ID generator
Install / Use
/learn @liexusong/AtomREADME
Atom
PHP unique ID generator, based on the Twitter snowflake algorithm
APIs:
/*
* Get the next unique ID
*/
string atom_next_id()
/*
* Change unique ID to array includes: timestamp, datacenter id and worker id
*/
array atom_explain(string $id)
example:
<?php
$id = atom_next_id();
echo $id;
$info = atom_explain($id);
echo date('Y-m-d H:i:s', $info['timestamp']);
?>
install:
$ cd ./atom
$ phpize
$ ./configure
$ make
$ sudo make install
php.ini configure entries:
[atom]
atom.datacenter = integer
atom.worker = integer
atom.twepoch = uint64
Related Skills
node-connect
342.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
85.3kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
342.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
342.5kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
