{"id":16609390,"url":"https://github.com/artbit/base_convert","last_synced_at":"2025-08-30T10:34:13.263Z","repository":{"id":56949855,"uuid":"43968073","full_name":"ArtBIT/base_convert","owner":"ArtBIT","description":"Custom PHP base_convert method that supports bases from 2 to 64","archived":false,"fork":false,"pushed_at":"2021-09-06T14:10:46.000Z","size":22,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-23T21:14:40.688Z","etag":null,"topics":["base-conversion","number-converter","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArtBIT.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-10-09T16:40:58.000Z","updated_at":"2021-09-06T14:10:49.000Z","dependencies_parsed_at":"2022-08-21T08:20:13.554Z","dependency_job_id":null,"html_url":"https://github.com/ArtBIT/base_convert","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ArtBIT/base_convert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtBIT%2Fbase_convert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtBIT%2Fbase_convert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtBIT%2Fbase_convert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtBIT%2Fbase_convert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArtBIT","download_url":"https://codeload.github.com/ArtBIT/base_convert/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArtBIT%2Fbase_convert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272839626,"owners_count":25001860,"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","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"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":["base-conversion","number-converter","php"],"created_at":"2024-10-12T01:28:56.715Z","updated_at":"2025-08-30T10:34:13.221Z","avatar_url":"https://github.com/ArtBIT.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Base Convert [2..64]\n[![Build Status](https://travis-ci.org/ArtBIT/base_convert.svg?branch=master)](https://travis-ci.org/ArtBIT/base_convert) [![GitHub license](https://img.shields.io/github/license/ArtBIT/base_convert.svg)](https://github.com/ArtBIT/base_convert) [![GitHub stars](https://img.shields.io/github/stars/ArtBIT/base_convert.svg)](https://github.com/ArtBIT/base_convert)  [![awesomeness](https://img.shields.io/badge/awesomeness-maximum-red.svg)](https://github.com/ArtBIT/base_convert)\n\nPHP's built in `base_convert` function supports bases ranging from 2 to 36. This library expands that range to 2 to 64.\n\n# Usage\nConvert a number 100 from decimal to hexadecimal (from base 10 to base 16):\n```php\necho math\\base_convert(100, 10, 16); \n// echoes '64'\n```\n...and back:\n```php\necho math\\base_convert(64, 16, 10); \n// echoes '100'\n```\n\n## Custom alphabets\nInstead of integer bases, you can pass in the alphabet string to use for conversion (since integer bases are converted to alphabet strings anyways, i.e. hexadecimal alphabet is simply \"0123456789abcdef\").\n\nHere we convert from base 10 to alphabet 'customizable'\n```php\necho math\\base_convert(1234567890, 10, 'customizable');\n// echoes 'slmmmmcui'\n```\n\nHere we convert from alphabet 'customizable' to alphabet 'isogram'\n```php\necho math\\base_convert('slmmmmcui', 'customizable', 'isogram');\n// echoes 'rorsirrioig'\n```\n\nAnd from alphabet 'isogram' back to base 10\n```php\necho math\\base_convert('rorsirrioig', 'isogram', 10);\n// echoes '1234567890'\n```\n\nSo both `slmmmmcui` and `rorsirrioig`, but also `1234567890` describe the same value, but in different alphabets.\n\n*NOTE:* All alphabets must be [isograms](https://en.wikipedia.org/wiki/Isogram)\nAn isogram (also known as a \"nonpattern word\") is a logological term for a word or phrase without a repeating letter. Conveniently, the word `isogram` is an isogram as well.\n\n# License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartbit%2Fbase_convert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fartbit%2Fbase_convert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fartbit%2Fbase_convert/lists"}