PHPackages                             ejfrancis/php-random-value - 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. ejfrancis/php-random-value

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

ejfrancis/php-random-value
==========================

Secure random value generator.

0864PHP

Since Jun 3Pushed 8y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

PHPRandomValue
==============

[](#phprandomvalue)

PHPRandomValue is a PHP class for generating random values including numbers, text strings, and keys originally developed for use within the [AlpineAuth](https://github.com/ejfrancis/AlpineAuth) library.

Random numbers are generated using mcrypt\_create\_iv(4, MCRYPT\_DEV\_URANDOM). Random text strings and keys (including letters and characters) are created by choosing characters at random using the number generator.

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

[](#installation)

The recommended way to install is using composer, with the following require:

`"ejfrancis/php-random-value": "dev-master"`

You can also download the classfile `RandomValue.php` and include it manually.

### Example Usage and Output

[](#example-usage-and-output)

```
include_once( 'RandomValue.php' );

$randomValue = new ejfrancis\RandomValue;

$randomValue->randomNumber(): //-3880998

$randomValue->randomNumberBetween(1,10): //2

$randomValue->randomTextString(): //CfCkKDHRgUULdGWcSqP4

$randomValue->randomTextString(10): //LorPIxaeEY

$randomValue->randomKey(): //C7al8tX9.gqYLf2ImVt/!$NOY79T5sNCT/6Q.$!.6Gf/Q5zpa3

$randomValue->randomKey(10): //RDV.dc6Ai/

$randomValue->randomStrongerKey(): //{I}s3897:}$xz4R@hpd!_+1L13[:_%1::pv/-asp2%4^#5$iG$F:{_Jf5s-98]raaqrhZ*Jg2k-nT-{9nBxsl!^dFI&21f"V:mU3

$randomValue->randomStrongerKey(15): //q:]qf941l[D&s8A
```

###  Health Score

22

—

LowBetter than 23% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3171352?v=4)[Evan Francis](/maintainers/ejfrancis)[@ejfrancis](https://github.com/ejfrancis)

---

Top Contributors

[![ejfrancis](https://avatars.githubusercontent.com/u/3171352?v=4)](https://github.com/ejfrancis "ejfrancis (20 commits)")

### Embed Badge

![Health badge](/badges/ejfrancis-php-random-value/health.svg)

```
[![Health](https://phpackages.com/badges/ejfrancis-php-random-value/health.svg)](https://phpackages.com/packages/ejfrancis-php-random-value)
```

###  Alternatives

[jaeger/querylist-phantomjs

QueryList Plugin: Use PhantomJS to crawl Javascript dynamically rendered pages.(headless WebKit ) 使用PhantomJS采集JavaScript动态渲染的页面

6124.3k1](/packages/jaeger-querylist-phantomjs)

PHPackages © 2026

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