{"id":18001991,"url":"https://github.com/crisu83/php-shortid","last_synced_at":"2025-09-17T11:32:42.854Z","repository":{"id":30660849,"uuid":"34216558","full_name":"crisu83/php-shortid","owner":"crisu83","description":"Library for generating short non-sequential unique identifiers in PHP","archived":false,"fork":false,"pushed_at":"2017-06-07T13:07:09.000Z","size":113,"stargazers_count":15,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-19T03:21:35.523Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crisu83.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":"2015-04-19T17:30:33.000Z","updated_at":"2024-04-27T20:34:17.000Z","dependencies_parsed_at":"2022-08-30T06:41:51.065Z","dependency_job_id":null,"html_url":"https://github.com/crisu83/php-shortid","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crisu83%2Fphp-shortid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crisu83%2Fphp-shortid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crisu83%2Fphp-shortid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crisu83%2Fphp-shortid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crisu83","download_url":"https://codeload.github.com/crisu83/php-shortid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222131003,"owners_count":16936304,"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":[],"created_at":"2024-10-29T23:19:36.816Z","updated_at":"2025-09-17T11:32:37.556Z","avatar_url":"https://github.com/crisu83.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# php-shortid\n\n[![Build Status](https://travis-ci.org/crisu83/php-shortid.svg?branch=master)](https://travis-ci.org/crisu83/php-shortid)\n[![Code Climate](https://codeclimate.com/github/crisu83/php-shortid/badges/gpa.svg)](https://codeclimate.com/github/crisu83/php-shortid)\n[![Total Downloads](https://poser.pugx.org/crisu83/shortid/downloads)](https://packagist.org/packages/crisu83/shortid) [![Latest Unstable Version](https://poser.pugx.org/crisu83/shortid/v/unstable.svg)](https://packagist.org/packages/crisu83/shortid) [![License](https://poser.pugx.org/crisu83/shortid/license.svg)](https://packagist.org/packages/crisu83/shortid)\n\nLibrary for generating short non-sequential unique identifiers in PHP.\n\n## Why do I want this?\n\nThis library was created as a more convenient alternative to other unique identifer generators such as UUID. \nWhile the identifiers generated may not be truly unique, they are more convenient because of their short form\nand unique enough to be used as e.g. entity ids, database identifiers, url-shorteners and much more.\n\n## Disclaimer\n\nPlease note that if your project requires the identifiers to be truly unique you should verify the uniqueness yourself.\nThis is by design to both increase the performance and reduce the memory consumption when generating identifiers.\n\n## Installation\n\nThe preferred way to install this extension is through [composer](http://getcomposer.org/download/).\n\nEither run\n\n```\nphp composer.phar require --prefer-dist crisu83/shortid \"*\"\n```\n\nor add\n\n```\n\"crisu83/shortid\": \"*\"\n```\n\nto the require section of your `composer.json` file.\n\n## Usage\n\nExample usage:\n\n```php\n\u003c?php\n\nuse Crisu83\\ShortId\\ShortId;\n\nrequire(__DIR__ . '/../vendor/autoload.php');\n\n$shortid = ShortId::create();\n\necho $shortid-\u003egenerate() . \"\\n\";\necho $shortid-\u003egenerate() . \"\\n\";\necho $shortid-\u003egenerate() . \"\\n\";\necho $shortid-\u003egenerate() . \"\\n\";\necho $shortid-\u003egenerate() . \"\\n\";\necho $shortid-\u003egenerate() . \"\\n\";\necho $shortid-\u003egenerate() . \"\\n\";\necho $shortid-\u003egenerate() . \"\\n\";\necho $shortid-\u003egenerate();\n```\n\nSample output:\n\n```\n$ php examples/examples.php\nmGRdss0\ncQEhtSm\nWAOsF0B\nWxo-6hC\nnjJM-67\nySojqwP\nyz03QdC\nbaDvRWZ\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrisu83%2Fphp-shortid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrisu83%2Fphp-shortid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrisu83%2Fphp-shortid/lists"}