PHPackages                             wataridori/bias-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. wataridori/bias-random

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

wataridori/bias-random
======================

Random element(s) with weight

v0.1.0(11y ago)720.1k4GPL-3.0PHP

Since Mar 18Pushed 10y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (3)Used By (0)

BiasRandom for PHP
==================

[](#biasrandom-for-php)

[![StyleCI](https://camo.githubusercontent.com/87c379244d3b2d39782f64bbfeeca639c5b6d01a641880180d433817326d1784/68747470733a2f2f7374796c6563692e696f2f7265706f732f33323433373338372f736869656c64)](https://styleci.io/repos/32437387)[![Build Status](https://camo.githubusercontent.com/e0855ee7bcc4040ddc927695beeb7928eb451b428fa77bc944f3427ecdb3dac1/68747470733a2f2f7472617669732d63692e6f72672f776174617269646f72692f626961732d72616e646f6d2e737667)](https://travis-ci.org/wataridori/bias-random)[![Latest Stable Version](https://camo.githubusercontent.com/ac6956f282058a8e9be9286acc1286693028960b1b5795cdf3be05d76cd5c076/68747470733a2f2f706f7365722e707567782e6f72672f776174617269646f72692f626961732d72616e646f6d2f762f737461626c652e737667)](https://packagist.org/packages/wataridori/bias-random)[![Total Downloads](https://camo.githubusercontent.com/e5062753968cc3dcbceff7637f48596565f9deee8a77789699a4bdf8715b6721/68747470733a2f2f706f7365722e707567782e6f72672f776174617269646f72692f626961732d72616e646f6d2f646f776e6c6f6164732e737667)](https://packagist.org/packages/wataridori/bias-random)[![Latest Unstable Version](https://camo.githubusercontent.com/90a2421fcf8a410a94d3e4ff88cfbfc91789fc36a4bff5abc76bbe361de2419b/68747470733a2f2f706f7365722e707567782e6f72672f776174617269646f72692f626961732d72616e646f6d2f762f756e737461626c652e737667)](https://packagist.org/packages/wataridori/bias-random)[![License](https://camo.githubusercontent.com/94f7c7def529b43573c35fad97fe841fe5549354a8ab4934183fa6861c256feb/68747470733a2f2f706f7365722e707567782e6f72672f776174617269646f72692f626961732d72616e646f6d2f6c6963656e73652e737667)](https://packagist.org/packages/wataridori/bias-random)

Requirement
-----------

[](#requirement)

- PHP &gt;= 5.4

Install
-------

[](#install)

You can install and manage BiasRandom by using `Composer`

```
composer require wataridori/bias-random

```

Or add `wataridori/bias-random` into the require section of your `composer.json` file then run `composer update`

Usage
-----

[](#usage)

```
$biasRandom = new wataridori/BiasRandom/BiasRandom();
$data = [
    'wataridori' => 10,
];
$biasRandom->setData($data);
$biasRandom->addElement('Tran', 20);
$biasRandom->addElement('Duc', 30);
$biasRandom->addElement('Thang', 40);

// Random one element with weight.
$biasRandom->random();

// Random two elements
$biasRandom->random(2);
```

Test
----

[](#test)

Just run `phpunit` to start test.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community9

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

4071d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/134a69054257dfdda1ccde099a44209654a12800b97c459b1ef4e9c3a90fe3c1?d=identicon)[wataridori](/maintainers/wataridori)

---

Top Contributors

[![wataridori](https://avatars.githubusercontent.com/u/1189893?v=4)](https://github.com/wataridori "wataridori (3 commits)")

---

Tags

bias-randomphprandom

### Embed Badge

![Health badge](/badges/wataridori-bias-random/health.svg)

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

###  Alternatives

[hanson/vbot

高度自定义的微信机器人，能够实现群控制，自动回复，消息转发，防撤回，留言统计等功能

4.4k14.4k12](/packages/hanson-vbot)[cretueusebiu/laravel-vue-spa

A Laravel-Vue SPA starter project template.

3.0k18.8k](/packages/cretueusebiu-laravel-vue-spa)[pid/speakingurl

Generate of so called 'static' or 'Clean URL' or 'Pretty URL' or 'nice-looking URL' or 'Speaking URL' or 'user-friendly URL' or 'SEO-friendly URL' or 'slug' from a string.

1.1k5.3k1](/packages/pid-speakingurl)[bmidget/kohana-formo

Formo is a form module for Kohana 3 that lets you work with forms as objects

1328.4k](/packages/bmidget-kohana-formo)[sbodak/magento2-checkout-custom-form

Add a custom form to Magento 2 checkout on the first step.

983.5k](/packages/sbodak-magento2-checkout-custom-form)

PHPackages © 2026

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