PHPackages                             onody/gachagacha - 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. onody/gachagacha

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

onody/gachagacha
================

Gacha-Gacha is an implementation of weighted randomization in PHP.

1.0.0(11y ago)0201MITPHPPHP &gt;=5.3.3

Since Jan 22Pushed 11y agoCompare

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

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

Gacha-Gacha
===========

[](#gacha-gacha)

[![Build Status](https://camo.githubusercontent.com/127aba66751bb4d21e4ee471fbb5b9a93b1633bd87cbba81f1adcf8b4fcfdd37/68747470733a2f2f7472617669732d63692e6f72672f6f6e6f64792f676163686167616368612e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/onody/gachagacha)[![Coverage Status](https://camo.githubusercontent.com/f77ce3e4a969330ce0d15b38f8ec8b8cab5f248e2b92bd69f3c8a6786ae273ca/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6f6e6f64792f676163686167616368612f62616467652e737667)](https://coveralls.io/r/onody/gachagacha)

Description
-----------

[](#description)

Gacha-Gacha is an implementation of weighted randomization in PHP.
Gacha-Gacha requires PHP &gt;= 5.3.3.

Usage
-----

[](#usage)

```
require_once './vendor/onody/gachagacha/src/autoload.php';

$gachagacha = new \GachaGacha\Picker();

$gachagacha->set('Marks',    30.124);
$gachagacha->set('Daniel',   20);
$gachagacha->set('Schuster', 0);

$gachagacha->pick();        // single item
$gachagacha->pick(1000);    // array of items
```

Install
-------

[](#install)

```
{
    "require": {
        "onody/gachagacha": "1.0.0"
    }
}
```

```
php composer.phar install
```

Licence
-------

[](#licence)

\[MIT\]

Author
------

[](#author)

[onody](https://github.com/onody)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

4125d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e4a4d21402e08b021d88a54c31867186be2d41aab4e45829861af5cc86a1f63?d=identicon)[onody](/maintainers/onody)

---

Top Contributors

[![onody](https://avatars.githubusercontent.com/u/5926016?v=4)](https://github.com/onody "onody (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/onody-gachagacha/health.svg)

```
[![Health](https://phpackages.com/badges/onody-gachagacha/health.svg)](https://phpackages.com/packages/onody-gachagacha)
```

###  Alternatives

[spiral/mcp-server

Spiral bridge for MCP server

541.1k2](/packages/spiral-mcp-server)

PHPackages © 2026

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