PHPackages                             saggre/weighted-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. saggre/weighted-random

ActiveLibrary

saggre/weighted-random
======================

Get weighted random samples using the alias method

1.0.0(2y ago)0424MITPHP ^8.1

Since Jul 2Compare

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

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

### README not available

The README for this package hasn't been synced yet. View it on [GitHub](https://github.com/Saggre/weighted-random).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

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

Total

2

Last Release

1046d ago

Major Versions

0.0.1-RC1 → 1.0.02023-07-02

### Community

Maintainers

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

---

Top Contributors

[![Saggre](https://avatars.githubusercontent.com/u/13721842?v=4)](https://github.com/Saggre "Saggre (1 commits)")

---

Tags

randomfakeraliasprobabilityweightedsample

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/saggre-weighted-random/health.svg)

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

###  Alternatives

[paragonie/random_compat

PHP 5.x polyfill for random\_bytes() and random\_int() from PHP 7

8.2k655.0M405](/packages/paragonie-random-compat)[fakerphp/faker

Faker is a PHP library that generates fake data for you.

3.9k358.5M3.5k](/packages/fakerphp-faker)[nelmio/alice

Expressive fixtures generator

2.5k43.4M133](/packages/nelmio-alice)[ircmaxell/random-lib

A Library For Generating Secure Random Numbers

84130.2M119](/packages/ircmaxell-random-lib)[zenstruck/foundry

A model factory library for creating expressive, auto-completable, on-demand dev/test fixtures with Symfony and Doctrine.

78311.9M97](/packages/zenstruck-foundry)[theofidry/alice-data-fixtures

Nelmio alice extension to persist the loaded fixtures.

32528.5M70](/packages/theofidry-alice-data-fixtures)

PHPackages © 2026

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