{"id":33997464,"url":"https://github.com/choval/lid","last_synced_at":"2026-05-30T17:32:03.099Z","repository":{"id":56952233,"uuid":"200436808","full_name":"choval/lid","owner":"choval","description":"A long represantation of a BIGINT for use in the Web with checksum","archived":false,"fork":false,"pushed_at":"2020-08-18T01:20:07.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-14T21:10:40.483Z","etag":null,"topics":["bigint","checkdigit","database-ids","format","id","longint","php"],"latest_commit_sha":null,"homepage":null,"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/choval.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":"2019-08-04T01:28:11.000Z","updated_at":"2020-08-18T01:19:11.000Z","dependencies_parsed_at":"2022-08-21T03:40:26.248Z","dependency_job_id":null,"html_url":"https://github.com/choval/lid","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/choval/lid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choval%2Flid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choval%2Flid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choval%2Flid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choval%2Flid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/choval","download_url":"https://codeload.github.com/choval/lid/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/choval%2Flid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33703065,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bigint","checkdigit","database-ids","format","id","longint","php"],"created_at":"2025-12-13T08:58:22.121Z","updated_at":"2026-05-30T17:32:03.081Z","avatar_url":"https://github.com/choval.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LID\n\nLID (LongID) is a 64-bit number used to identify rows in a database.  \nMade specifically for use with BIGINT/LONGINT in databases. Includes a checksum to verify data.\n\nNote: v1.x is not compatible with v0.x.\n\n## Install\n\n```sh\ncomposer require choval/lid^1.0\n```\n\n## Format\n\nIt is built using a base 62:\n\n```\n0123456789\nabcdefghijklmnopqrstuvwxyz\nABCDEFGHIJKLMNOPQRSTUVWXYZ\n```\n\n* Except the web format, see \u003ca href=\"#web\"\u003eWeb\u003c/a\u003e.\n\nThe checksum (Damm) is the first character.\n\n### Examples\n\n```\nNUM: 9223372036854775807\nWEB: 75FE_KXVC_3KP2_6XC7\nLID: 7aZl-8N0y-58M7\n\nNUM: 8057322199735401981\nWEB: 94V7_27P8_8CP6_54X1\nLID: 99Bc-CvJ3-BrCR\n\nNUM: 495653535173419733\nWEB: 961_3H6_471H_P96H\nLID: 9AC-66ri-lnk9\n\nNUM: 3412381023195\nWEB: 0_6H_5V91_7PXK\nLID: 0-Y4L-x15V\n\nNUM: 8954382094\nWEB: 2_6XV4_PK4J\nLID: 2-9L-ZFPE\n\nNUM: 21398\nWEB: 1_2H9V\nLID: 1-5z8\n\nNUM: 1024\nWEB: 4_2E4\nLID: 4-gw\n```\n\n\n\u003ca name=\"web\"\u003e\u003c/a\u003e\n## Web\n\nA different base is used for the web format.\n\nAltough longer in length due to a shorter base, it is easier for dictation (across dialects) and more error friendly for OCR engines.\n\nAlias characters are replaced.\n\n```\n0 - zero - alias: OoDQ\n1 - one - alias: IiLl\n2 - two - alias: Zz\n3 - three\n4 - four - alias: AYy\n5 - five - alias: Ss\n6 - six - alias: Gb\n7 - seven - alias: T\n8 - eight - alias: BRg\n9 - nine - alias: q\nC - charlie - alias c\nE - echo - alias e\nF - foxtrot - alias f\nH - hotel - alias h\nJ - juliett - alias j\nK - kilo - alias k\nN - november - alias: Mmn\nP - tango - alias: p\nV - victor - alias: UuWw\nX - xray - alias x\n```\n\n## Usage\n\n```php\n/**\n * Basic usage\n */\n$lid = new Lid( 21398 );\necho $lid-\u003eid();\n// 1-5z8\necho $lid-\u003eweb();\n// 1_2H9V\necho $lid-\u003enumber();\n// 21398\n\n/**\n * The constructor accepts an int, a LID or a Web LID\n */\n$lid = new Lid( '1_2H9V' );\necho $lid-\u003eid();\n// 1-5z8\necho $lid-\u003eweb();\n// 1_2H9V\necho $lid-\u003enumber();\n// 21398\n\n\n/**\n * The constructor accepts long formats as well\n */\n$lid = new Lid( '1000_0000_0000_2H9V' );\necho $lid-\u003eid();\n// 1-5z8\necho $lid-\u003eweb();\n// 1_2H9V\necho $lid-\u003enumber();\n// 21398\n\n\n/**\n * And the web format allows you to make mistakes with letters and nums\n */\n$lid = new Lid( '1_zHqU' );\necho $lid-\u003eid();\n// 1-5z8\necho $lid-\u003eweb();\n// 1_2H9V\necho $lid-\u003enumber();\n// 21398\n```\n\n## License\n\nMIT, see LICENSE\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoval%2Flid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchoval%2Flid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchoval%2Flid/lists"}