PHPackages                             jakoubek/php-recordlocator - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. jakoubek/php-recordlocator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jakoubek/php-recordlocator
==========================

A library to encode integers into a short and easy to read string.

2151PHP

Since Dec 30Pushed 7y ago2 watchersCompare

[ Source](https://github.com/jakoubek/php-recordlocator)[ Packagist](https://packagist.org/packages/jakoubek/php-recordlocator)[ RSS](/packages/jakoubek-php-recordlocator/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

php-recordlocator
=================

[](#php-recordlocator)

A library to encode integers into a short and easy to read string.

php-recordlocator is a PHP clone of Jesse Vincent's Perl module [Number::RecordLocator](http://search.cpan.org/~jesse/Number-RecordLocator-0.005/lib/Number/RecordLocator.pm).

A **RecordLocator** is an alphanumerical string that represents an integer. This library encodes integers to RecordLocators and decodes RecordLocators back to integers.

A **RecordLocator** is shorter than the corresponding integer and easier to read and memorize. You can use it to encode autoincrement primary keys from an database to an human-readable representation for your users.

*Best Practical* uses RecordLocators for their web-based todo list and task manager [Hiveminder](http://hiveminder.com/).

Examples
--------

[](#examples)

- The integer *5,325* encodes to the RecordLocator *78G*.
- The integer *3,512,345* encodes to the RecordLocator *5E82T*.

Both RecordLocators are shorter than their integer equivalent. You can encode more than 33.5 million integers in an 5-char RecordLocator: the largest 5-char RecordLocator, *ZZZZZ*, represents the integer *33,554,431*.

With 6 chars you can encode integers up to more than 1 billion.

Usage
-----

[](#usage)

```
// encoding an integer into a RecordLocator string
$generator = new RecordLocator;
$integer = 5325;
$string = $generator->encode($integer);
echo $string;
```

```
78G

```

```
// decoding a RecordLocator string back to an integer
$generator = new RecordLocator;
$string = '78G';
$integer = $generator->encode($string);
echo $integer;
```

```
5325

```

Changelog
---------

[](#changelog)

#### 1.0.0 - released 2013-03-03

[](#100---released-2013-03-03)

- Initial release

#### 1.1.0 - released 2018-12-30

[](#110---released-2018-12-30)

- updated to PHPUnit 7

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a3d800d498fc3b37ca7b3061b83ff5b9e494ca2f09100b2d0362deb81fa1d884?d=identicon)[jakoubek](/maintainers/jakoubek)

---

Top Contributors

[![jakoubek](https://avatars.githubusercontent.com/u/179566?v=4)](https://github.com/jakoubek "jakoubek (10 commits)")

### Embed Badge

![Health badge](/badges/jakoubek-php-recordlocator/health.svg)

```
[![Health](https://phpackages.com/badges/jakoubek-php-recordlocator/health.svg)](https://phpackages.com/packages/jakoubek-php-recordlocator)
```

PHPackages © 2026

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