PHPackages                             eonx-com/easy-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. eonx-com/easy-random

ActiveLibrary

eonx-com/easy-random
====================

Provides easy way to generate random values (string, int, uuids, ...)

6.20.0(2mo ago)31.2M↓20%5MITPHPPHP ^8.2

Since Jun 11Pushed 1mo ago3 watchersCompare

[ Source](https://github.com/eonx-com/easy-random)[ Packagist](https://packagist.org/packages/eonx-com/easy-random)[ RSS](/packages/eonx-com-easy-random/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (18)Versions (488)Used By (5)

\---eonx\_docs--- title: Introduction weight: 0 ---eonx\_docs---

Do you need to generate random and unique values? This package is for you!

- Strings
- Numbers
- UUIDs

All the randomness you need!

### Require package (Composer)

[](#require-package-composer)

The recommended way to install this package is to use [Composer](https://getcomposer.org/):

```
$ composer require eonx-com/easy-random
```

### Usage

[](#usage)

#### Integers

[](#integers)

```
// Will generate a random integer between 0 and 20 (both included)
$myNumber = (new \EonX\EasyRandom\Generator\RandomGenerator(...))->integer(0, 20);
```

### Strings

[](#strings)

The random generator allows you to control the length, and the composition of the generated random strings via a nice fluent interface:

```
$myString = (new \EonX\EasyRandom\Generator\RandomGenerator(...))
    ->string(16)
    ->excludeSimilar() // Will exclude similar characters
    ->excludeVowel() // Will exclude vowels, nice trick to avoid "bad words" in generated random strings
    ->includeNumeric(); // Include 0-9 numbers
```

Do you need to generate random strings for your end users?

```
// Will generate "user friendly" random string:
// - exclude ambiguous characters
// - exclude symbols
// - exclude vowels
// - include numeric
// - include uppercase

$reference = (new \EonX\EasyRandom\Generator\RandomGenerator(...))
    ->string(16)
    ->userFriendly();
```

### UUID

[](#uuid)

The random generator allows you to generate UUID. This package comes with built-in implementations for: [symfony/uid](https://symfony.com/doc/current/components/uid.html). If you want to use your own, then you will need to make sure it implements `EonX\EasyRandom\Generator\UuidGeneratorInterface`.

```
$uuid = (new \EonX\EasyRandom\Generator\RandomGenerator(...))->uuid();
```

###  Health Score

65

—

FairBetter than 99% of packages

Maintenance89

Actively maintained with recent releases

Popularity42

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity87

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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

Total

471

Last Release

66d ago

Major Versions

3.4.27 → 4.1.212022-05-12

4.4.5 → 5.0.02023-07-25

4.5.8 → 5.2.22023-08-31

5.13.1 → 6.0.0-alpha.32024-08-15

5.13.2 → 6.0.12024-09-24

PHP version history (5 changes)v2.4.11PHP ^7.1

v2.5.3PHP ^7.2

3.4.0PHP ^7.2 || ^8.0

4.0.10PHP ^8.1

6.0.0-alpha.3PHP ^8.2

### Community

Maintainers

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

---

Top Contributors

[![natepage](https://avatars.githubusercontent.com/u/11576446?v=4)](https://github.com/natepage "natepage (128 commits)")[![roman-eonx](https://avatars.githubusercontent.com/u/48544017?v=4)](https://github.com/roman-eonx "roman-eonx (116 commits)")[![alexndlm](https://avatars.githubusercontent.com/u/6824784?v=4)](https://github.com/alexndlm "alexndlm (38 commits)")[![itorgov](https://avatars.githubusercontent.com/u/1703419?v=4)](https://github.com/itorgov "itorgov (21 commits)")[![TomasVotruba](https://avatars.githubusercontent.com/u/924196?v=4)](https://github.com/TomasVotruba "TomasVotruba (5 commits)")[![BOB41K1987](https://avatars.githubusercontent.com/u/20467102?v=4)](https://github.com/BOB41K1987 "BOB41K1987 (3 commits)")[![voodooism](https://avatars.githubusercontent.com/u/31572316?v=4)](https://github.com/voodooism "voodooism (1 commits)")[![buddyshontogan](https://avatars.githubusercontent.com/u/21209558?v=4)](https://github.com/buddyshontogan "buddyshontogan (1 commits)")[![ERuban](https://avatars.githubusercontent.com/u/13186130?v=4)](https://github.com/ERuban "ERuban (1 commits)")[![albertlabarentojr](https://avatars.githubusercontent.com/u/12888117?v=4)](https://github.com/albertlabarentojr "albertlabarentojr (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eonx-com-easy-random/health.svg)

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k16.7M310](/packages/easycorp-easyadmin-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

81733.7k](/packages/flow-php-flow)

PHPackages © 2026

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