PHPackages                             mikefrancis/tokenizr - 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. mikefrancis/tokenizr

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

mikefrancis/tokenizr
====================

PHP library to generate unique, URL friendly tokens

v2.0(10y ago)61.7kMITPHPPHP &gt;=5.4.0

Since Jul 24Pushed 10y ago1 watchersCompare

[ Source](https://github.com/mikefrancis/tokenizr)[ Packagist](https://packagist.org/packages/mikefrancis/tokenizr)[ RSS](/packages/mikefrancis-tokenizr/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (3)Used By (0)

tokenizr
========

[](#tokenizr)

[![Build Status](https://camo.githubusercontent.com/b4b62822226a57872303ca2b361206708bcfa7d2c179eb57b2fce9480fc8d97b/68747470733a2f2f7472617669732d63692e6f72672f6d696b656672616e6369732f746f6b656e697a722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mikefrancis/tokenizr) [![Coverage Status](https://camo.githubusercontent.com/6ad2eac73ff6fb3231ba5fcf0eb566c58a97a5a126e0c5b86e7591fac78518bb/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6d696b656672616e6369732f746f6b656e697a722f62616467652e7376673f6272616e63683d6d617374657226736572766963653d676974687562)](https://coveralls.io/github/mikefrancis/tokenizr?branch=master) [![StyleCI](https://camo.githubusercontent.com/5aefb28f17708307e65e59a8fee0b53032d80fd18efc9f300aae9169aa38d16c/68747470733a2f2f7374796c6563692e696f2f7265706f732f32363337363737352f736869656c64)](https://styleci.io/repos/26376775)

PHP library to generate unique, URL friendly tokens. Built with TDD.

Installation
------------

[](#installation)

Add the following to your project's composer.json require block:

```
"mikefrancis/tokenizr": "^2.0"

```

and run `composer update` to pull in the package.

Basic Usage
-----------

[](#basic-usage)

Create a new `Tokenizr` instance:

```
$tokenizr = new MikeFrancis\Tokenizr\Tokenizr();

```

and then go ahead and generate some tokens:

```
$token = $tokenizr->generate();

```

By default Tokenizr will generate URL friendly, alpha-numeric tokens. If you'd like to change the bank of characters which is used, you can do by overriding the default character set:

```
$tokenizr->setCharacters('!@£$%^&*()');

```

You can also set a bunch of tokens first, as not to create duplicates when generating new ones:

```
$tokenizr->setExistingTokens(['4uNq1', '6ijRw']);

```

By default, Tokenizr will generate 5 character strings, but if you'd like them to be longer/shorter just do the following before you generate any tokens:

```
$tokenizr->setTokenLength(32);

```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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 ~33 days

Total

2

Last Release

3965d ago

Major Versions

v1.0 → v2.02015-08-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/935b1f18dd34ab05e26762b56244398325bdb866f040e15c3b0314f32afae35b?d=identicon)[mikefrancis](/maintainers/mikefrancis)

---

Top Contributors

[![mikefrancis](https://avatars.githubusercontent.com/u/1672610?v=4)](https://github.com/mikefrancis "mikefrancis (69 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mikefrancis-tokenizr/health.svg)

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

PHPackages © 2026

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