PHPackages                             cartware/custombase - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. cartware/custombase

ActiveLibrary

cartware/custombase
===================

A PHP port of Elixir's CustomBase module

1.0.0(4y ago)08MITPHPPHP ^7.2 || ^8

Since Jan 21Pushed 4y ago2 watchersCompare

[ Source](https://github.com/Cartware/php_custombase)[ Packagist](https://packagist.org/packages/cartware/custombase)[ RSS](/packages/cartware-custombase/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

cartware/custombase
===================

[](#cartwarecustombase)

A PHP port of [Elixir's CustomBase module](https://hex.pm/packages/custom_base)

Example
-------

[](#example)

Lets make `Base12` module with conversion described below.

ValueEncoding0011223344556677889910A11B```
use Cartware\CustomBase\CustomBase;

class Base12 {
	use CustomBase;
	protected const CUSTOMBASE_ALPHABET = '0123456789AB';
}
```

Now your class has 2 functions `encode/1` and `decode/1`:

```
$base12 = new Base12();

$base12->encode(9); # 9
$base12->encode(10); # A
$base12->encode(11); # B
$base12->encode(12); # 10

$base12->decode(16); # 18
$base12->decode('AB'); # 131
```

[License](https://github.com/Cartware/php_custombase/blob/master/LICENSE)
-------------------------------------------------------------------------

[](#license)

Released under the MIT License.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~434 days

Total

2

Last Release

1508d ago

Major Versions

0.1.0 → 1.0.02022-04-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/6dff4277ede809ad54c065120997faf18b1706485f5e0d54689a1bfb69404087?d=identicon)[cartware](/maintainers/cartware)

---

Top Contributors

[![bucha](https://avatars.githubusercontent.com/u/1931120?v=4)](https://github.com/bucha "bucha (3 commits)")

---

Tags

identifier

### Embed Badge

![Health badge](/badges/cartware-custombase/health.svg)

```
[![Health](https://phpackages.com/badges/cartware-custombase/health.svg)](https://phpackages.com/packages/cartware-custombase)
```

###  Alternatives

[ramsey/uuid

A PHP library for generating and working with universally unique identifiers (UUIDs).

12.6k700.2M3.3k](/packages/ramsey-uuid)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[pascaldevink/shortuuid

PHP 7.4+ library that generates concise, unambiguous, URL-safe UUIDs

5951.8M15](/packages/pascaldevink-shortuuid)[keiko/uuid-shortener

A simple shortener library for RFC 4122 compatible UUIDs. Change your 36 chars long UUID into it's shorter equivalent.

150215.4k2](/packages/keiko-uuid-shortener)[visus/cuid2

A PHP library for generating collision-resistant ids (CUIDs).

421.1M4](/packages/visus-cuid2)[oittaa/uuid

A small PHP class for generating RFC 9562 universally unique identifiers (UUID) from version 3 to version 8.

50302.7k5](/packages/oittaa-uuid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
