{"id":44359539,"url":"https://github.com/alexeyco/php-snowflake-id","last_synced_at":"2026-02-11T17:15:44.029Z","repository":{"id":56944538,"uuid":"123744194","full_name":"alexeyco/php-snowflake-id","owner":"alexeyco","description":"Generate Twitter Snowflake flavoured IDs","archived":false,"fork":false,"pushed_at":"2018-03-09T03:20:30.000Z","size":50,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-13T12:02:32.796Z","etag":null,"topics":["id","php","snowflake"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexeyco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-04T00:46:22.000Z","updated_at":"2020-03-29T09:42:41.000Z","dependencies_parsed_at":"2022-08-21T07:20:12.405Z","dependency_job_id":null,"html_url":"https://github.com/alexeyco/php-snowflake-id","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/alexeyco/php-snowflake-id","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeyco%2Fphp-snowflake-id","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeyco%2Fphp-snowflake-id/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeyco%2Fphp-snowflake-id/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeyco%2Fphp-snowflake-id/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexeyco","download_url":"https://codeload.github.com/alexeyco/php-snowflake-id/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexeyco%2Fphp-snowflake-id/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29339000,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T16:14:43.024Z","status":"ssl_error","status_checked_at":"2026-02-11T16:14:15.258Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["id","php","snowflake"],"created_at":"2026-02-11T17:15:43.969Z","updated_at":"2026-02-11T17:15:44.017Z","avatar_url":"https://github.com/alexeyco.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Snowflake ID\n\n[![Build Status](https://travis-ci.org/alexeyco/php-snowflake-id.svg?branch=master)](https://travis-ci.org/alexeyco/php-snowflake-id)\n[![Coverage Status](https://coveralls.io/repos/github/alexeyco/php-snowflake-id/badge.svg?branch=master)](https://coveralls.io/github/alexeyco/php-snowflake-id?branch=master)\n[![StyleCI](https://styleci.io/repos/123744194/shield?style=flat\u0026branch=master)](https://styleci.io/repos/123744194?branch=master)\n\nTwitter Snowflake flavoured IDs:\n* Generate and parse it;\n* Convert it to string or integer value;\n* Enjoy that it's not UUID (a joke, who does not like UUID).\n\n## Generate\n\n```php\n\u003c?php\n\nuse SnowFlake\\Node;\n\n// Set up custom epoch and node\nNode::getInstance()\n    -\u003esetEpoch(new \\DateTime('2000-01-01 00:00:00')) // Default is 2006-03-21:20:50:14 GMT\n    -\u003esetNode(1); // Default is 0; can be between 0 and 1023\n\n$id = Node::getInstance()-\u003egenerate();\n\nvar_dump($id-\u003etoInt());\n// =\u003e 6375898920270168065\n\nvar_dump($id-\u003etoString();\n// =\u003e 1cfvnjc093zlt\n```\n\n## Parse\n```php\n\u003c?php\n\nuse SnowFlake\\Parser;\n\n$id = Parser::fromString('1cfvnjc093zlt');\n\nvar_dump($id-\u003etoInt());\n// ==\u003e 6375898920270168065\n```\n\n## License\n\n```\nMIT License\n\nCopyright (c) 2018 Alexey Popov\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexeyco%2Fphp-snowflake-id","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexeyco%2Fphp-snowflake-id","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexeyco%2Fphp-snowflake-id/lists"}