{"id":18775150,"url":"https://github.com/robinvdvleuten/php-ulid","last_synced_at":"2025-05-15T16:02:54.478Z","repository":{"id":17265885,"uuid":"81564252","full_name":"robinvdvleuten/php-ulid","owner":"robinvdvleuten","description":"A PHP port of alizain/ulid with some minor improvements.","archived":false,"fork":false,"pushed_at":"2023-01-27T05:43:42.000Z","size":36,"stargazers_count":450,"open_issues_count":5,"forks_count":32,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-07T21:11:45.321Z","etag":null,"topics":["generator","hacktoberfest","identifier","php","ulid"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/robinvdvleuten/ulid","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/robinvdvleuten.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-02-10T12:41:40.000Z","updated_at":"2025-04-01T06:46:12.000Z","dependencies_parsed_at":"2023-02-15T06:02:05.695Z","dependency_job_id":null,"html_url":"https://github.com/robinvdvleuten/php-ulid","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinvdvleuten%2Fphp-ulid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinvdvleuten%2Fphp-ulid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinvdvleuten%2Fphp-ulid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinvdvleuten%2Fphp-ulid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robinvdvleuten","download_url":"https://codeload.github.com/robinvdvleuten/php-ulid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254374398,"owners_count":22060609,"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":["generator","hacktoberfest","identifier","php","ulid"],"created_at":"2024-11-07T19:40:32.577Z","updated_at":"2025-05-15T16:02:54.433Z","avatar_url":"https://github.com/robinvdvleuten.png","language":"PHP","funding_links":[],"categories":["字符串( Strings )"],"sub_categories":[],"readme":"# Universally Unique Lexicographically Sortable Identifier\n\n[![Latest Stable Version](https://poser.pugx.org/robinvdvleuten/ulid/v/stable)](https://packagist.org/packages/robinvdvleuten/ulid)\n[![Build Status](https://img.shields.io/github/workflow/status/robinvdvleuten/php-ulid/run-tests.svg?style=flat-square)](https://github.com/robinvdvleuten/php-ulid/actions?query=workflow%3Arun-tests)\n\nA PHP port of [ulid/javascript](https://github.com/ulid/javascript) with some minor improvements.\n\n\u003ca href=\"https://webstronauts.com/\"\u003e\n    \u003cimg src=\"https://webstronauts.com/badges/sponsored-by-webstronauts.svg\" alt=\"Sponsored by The Webstronauts\" width=\"200\" height=\"65\"\u003e\n\u003c/a\u003e\n\n## Installation\n\nYou can install the package via [Composer](https://getcomposer.org).\n\n```bash\ncomposer require robinvdvleuten/ulid\n```\n\n## Usage\n\n```php\nuse Ulid\\Ulid;\n\n$ulid = Ulid::generate();\necho (string) $ulid; // 01B8KYR6G8BC61CE8R6K2T16HY\n\n// Or if you prefer a lowercased output\n$ulid = Ulid::generate(true);\necho (string) $ulid; // 01b8kyr6g8bc61ce8r6k2t16hy\n\n// If you need the timestamp from an ULID instance\n$ulid = Ulid::generate();\necho $ulid-\u003etoTimestamp(); // 1561622862\n\n// You can also generate a ULID for a specific UNIX-time in milliseconds\n$ulid = Ulid::fromTimestamp(1593048767015);\n// or with a lower cased output: $ulid = Ulid::fromTimestamp(1593048767015, true);\necho (string) $ulid; // 01EBMHP6H7TT1Q4B7CA018K5MQ\n```\n\n### Testing\n\n``` bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [the GitHub \"Releases\" page](https://github.com/robinvdvleuten/php-ulid/releases) for more information on what has changed recently.\n\n## Credits\n\nAs it's just a simple port of JavaScript to PHP code. All credits should go to the original [ULID](https://github.com/ulid/spec) specs.\n\n- [Robin van der Vleuten](https://github.com/robinvdvleuten)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinvdvleuten%2Fphp-ulid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobinvdvleuten%2Fphp-ulid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinvdvleuten%2Fphp-ulid/lists"}