PHPackages                             myerscode/utilities-random - 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. myerscode/utilities-random

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

myerscode/utilities-random
==========================

A PHP utility class that creates a fluent random value generator

2026.0.0(2mo ago)10MITPHPPHP ^8.5CI passing

Since Apr 8Pushed 3w ago1 watchersCompare

[ Source](https://github.com/myerscode/utilities-random)[ Packagist](https://packagist.org/packages/myerscode/utilities-random)[ RSS](/packages/myerscode-utilities-random/feed)WikiDiscussions main Synced 4w ago

READMEChangelog (1)Dependencies (3)Versions (5)Used By (0)

Random Utilities
================

[](#random-utilities)

> A fluent PHP utility class to help create random values.

> ⚠️ This package is designed for generating random strings, codes, and identifiers — not for cryptographic purposes. Do not use it for passwords, tokens, or anything requiring cryptographic security.

[![Latest Stable Version](https://camo.githubusercontent.com/683ffc77d50e68cdb86e4b57aa32a58b5381a320faf074a1a6b36b6922d38b78/68747470733a2f2f706f7365722e707567782e6f72672f6d79657273636f64652f7574696c69746965732d72616e646f6d2f762f737461626c65)](https://packagist.org/packages/myerscode/utilities-random)[![Total Downloads](https://camo.githubusercontent.com/1483bb364e367b281a04bcc5b9371885fd494399255ee3f38920dc158d595b96/68747470733a2f2f706f7365722e707567782e6f72672f6d79657273636f64652f7574696c69746965732d72616e646f6d2f646f776e6c6f616473)](https://packagist.org/packages/myerscode/utilities-random)[![PHP Version Require](https://camo.githubusercontent.com/3183de6f54d2faced64a66b92d422ffb04330a9090317f970d66dfb5d0183d42/687474703a2f2f706f7365722e707567782e6f72672f6d79657273636f64652f7574696c69746965732d72616e646f6d2f726571756972652f706870)](https://packagist.org/packages/myerscode/utilities-random)[![License](https://camo.githubusercontent.com/bd7e7c81a48358542734a0e0966474b871ab9dfb4aa768d055d38a06802826c6/68747470733a2f2f706f7365722e707567782e6f72672f6d79657273636f64652f7574696c69746965732d72616e646f6d2f6c6963656e7365)](https://github.com/myerscode/utilities-random/blob/main/LICENSE)[![Tests](https://github.com/myerscode/utilities-random/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/myerscode/utilities-random/actions/workflows/tests.yml)[![codecov](https://camo.githubusercontent.com/5cda08c64b164ded1c50af64753d10f9d4f0c7f05165aa2a4f48db2fafb4595e/68747470733a2f2f636f6465636f762e696f2f67682f6d79657273636f64652f7574696c69746965732d72616e646f6d2f67726170682f62616467652e737667)](https://codecov.io/gh/myerscode/utilities-random)

Requirements
------------

[](#requirements)

- PHP 8.5+

Install
-------

[](#install)

```
composer require myerscode/utilities-random
```

Usage
-----

[](#usage)

```
use Myerscode\Utilities\Random\Drivers\AlphaNumericDriver;
use Myerscode\Utilities\Random\Utility;

$utility = new Utility(AlphaNumericDriver::class);

// Generate a random string of length 5
$random = $utility->generate();

// Generate with custom length
$random = $utility->length(10)->generate();

// Generate chunked values
$random = $utility->length(4)->chunks(3)->spacer('-')->generate();
// e.g. "aB3x-Kp9z-mN2q"

// Generate unique values
$unique = $utility->length(10)->unique();
```

Documentation
-------------

[](#documentation)

- [Usage](docs/usage.md) — full API reference and usage examples
- [Drivers](docs/drivers.md) — built-in drivers and creating custom ones
- [Constraints](docs/constraints.md) — constraining generation with pool filters and output constraints

License
-------

[](#license)

MIT

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance90

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.2% 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

Unknown

Total

1

Last Release

84d ago

### Community

Maintainers

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

---

Top Contributors

[![oniice](https://avatars.githubusercontent.com/u/2676321?v=4)](https://github.com/oniice "oniice (40 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

php-libraryrandomrandom-generationutilitiesutilityutility-libraryrandomutilitylibraryfluenttextchainingnumber

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/myerscode-utilities-random/health.svg)

```
[![Health](https://phpackages.com/badges/myerscode-utilities-random/health.svg)](https://phpackages.com/packages/myerscode-utilities-random)
```

###  Alternatives

[maciejczyzewski/bottomline

A full-on PHP manipulation utility belt that provides support for working with arrays, objects, and iterables; a lodash or underscore equivalent for PHP.

477643.1k10](/packages/maciejczyzewski-bottomline)[hi-folks/rando-php

Random generator Library for PHP

12992.5k2](/packages/hi-folks-rando-php)[me-io/php-lodash

A full-on PHP manipulation utility-belt that provides support for the usual functional.

39104.0k](/packages/me-io-php-lodash)

PHPackages © 2026

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