{"id":22955162,"url":"https://github.com/visus-io/php-cuid2","last_synced_at":"2025-10-04T18:23:34.231Z","repository":{"id":65227752,"uuid":"588715792","full_name":"visus-io/php-cuid2","owner":"visus-io","description":"PHP implementation of collision-resistant ids","archived":false,"fork":false,"pushed_at":"2025-03-10T19:37:54.000Z","size":445,"stargazers_count":31,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T22:05:43.897Z","etag":null,"topics":["cuid","cuid-generator","php"],"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/visus-io.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-13T20:11:59.000Z","updated_at":"2025-03-10T19:37:56.000Z","dependencies_parsed_at":"2023-10-03T14:38:21.617Z","dependency_job_id":"eadb4ca0-0472-41da-941b-cc41a2f4715e","html_url":"https://github.com/visus-io/php-cuid2","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visus-io%2Fphp-cuid2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visus-io%2Fphp-cuid2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visus-io%2Fphp-cuid2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/visus-io%2Fphp-cuid2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/visus-io","download_url":"https://codeload.github.com/visus-io/php-cuid2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411231,"owners_count":20934653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cuid","cuid-generator","php"],"created_at":"2024-12-14T16:28:04.123Z","updated_at":"2025-10-04T18:23:34.201Z","avatar_url":"https://github.com/visus-io.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# visus/cuid2\n\n[![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/visus-io/php-cuid2/ci.yml?style=for-the-badge\u0026logo=github)](https://github.com/visus-io/php-cuid2/actions/workflows/ci.yaml)\n\n[![Sonar Quality Gate](https://img.shields.io/sonar/quality_gate/visus%3Aphp-cuid2?server=https%3A%2F%2Fsonarcloud.io\u0026style=for-the-badge\u0026logo=sonarcloud\u0026logoColor=white)](https://sonarcloud.io/summary/overall?id=visus%3Aphp-cuid2)\n[![Sonar Coverage](https://img.shields.io/sonar/coverage/visus%3Aphp-cuid2?server=https%3A%2F%2Fsonarcloud.io\u0026style=for-the-badge\u0026logo=sonarcloud\u0026logoColor=white)](https://sonarcloud.io/summary/overall?id=visus%3Aphp-cuid2)\n[![Sonar Tests](https://img.shields.io/sonar/tests/visus%3Aphp-cuid2?server=https%3A%2F%2Fsonarcloud.io\u0026style=for-the-badge\u0026logo=sonarcloud\u0026logoColor=white)](https://sonarcloud.io/summary/overall?id=visus%3Aphp-cuid2)\n\n![PHP Version](https://img.shields.io/packagist/dependency-v/visus/cuid2/php?style=for-the-badge)\n[![Packagist](https://img.shields.io/packagist/v/visus/cuid2?style=for-the-badge\u0026logo=packagist\u0026logoColor=white\u0026label=stable)](https://packagist.org/packages/visus/cuid2)\n![Downloads](https://img.shields.io/packagist/dt/visus/cuid2?style=for-the-badge\u0026logo=packagist\u0026logoColor=white\u0026color=8)\n![GitHub](https://img.shields.io/github/license/visus-io/cuid.net?style=for-the-badge)\n\nA PHP implementation of collision-resistant ids. You can read more about CUIDs from the [official project website](https://github.com/paralleldrive/cuid2).\n\n## Getting Started\n\nYou can install visus/cuid2 as a [composer package](https://packagist.org/packages/visus/cuid2):\n\n```shell\ncomposer require visus/cuid2\n```\n\u003e [!TIP]\n\u003e Consider installing/enabling the PHP extension [GMP](https://www.php.net/manual/en/intro.gmp.php).\n\u003e If this is not an option then [markrogoyski/math-php](https://github.com/markrogoyski/math-php) will be used as a fallback.\n\n## Quick Example\n\n```php\n\u003c?php\nrequire_once 'vendor/autoload.php';\n\n// new (default length of 24)\n$cuid = new Visus\\Cuid2\\Cuid2();\n\n// implicit casting\necho $cuid; // apr5hhh4ox45krsg9gycbs9k\n\n// explicit casting\necho $cuid-\u003etoString(); // apr5hhh4ox45krsg9gycbs9k\n\n// new (with custom length)\n$cuid = new Visus\\Cuid2\\Cuid2(10);\necho $cuid; // pekw02xwsd\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvisus-io%2Fphp-cuid2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvisus-io%2Fphp-cuid2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvisus-io%2Fphp-cuid2/lists"}