PHPackages                             ethtezahl/dice-roller - 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. ethtezahl/dice-roller

ActiveLibrary

ethtezahl/dice-roller
=====================

RPG rolling dice simulation

0.1.3(8y ago)1681[1 PRs](https://github.com/Ethtezahl/dice-roller/pulls)MITPHPPHP &gt;=7.0

Since Jul 13Pushed 5y ago2 watchersCompare

[ Source](https://github.com/Ethtezahl/dice-roller)[ Packagist](https://packagist.org/packages/ethtezahl/dice-roller)[ Docs](https://github.com/Ethtezahl/dice-roller)[ RSS](/packages/ethtezahl-dice-roller/feed)WikiDiscussions master Synced 2d ago

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

RPG Dice Roller
===============

[](#rpg-dice-roller)

Concept.
--------

[](#concept)

I wanted to code a program which create stats for pre-rolled characters for rpg "Call of Cthulhu". I needed a library that can simulate and give result of a roll of multiple dice (sometimes with a different number of sides). So I created this library, to make these rolls.

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

[](#installation)

composer require ethtezahl/dice-roller

Basic usage
-----------

[](#basic-usage)

The code above will simulate the roll of two six-sided die

```
// First: import needed class
use Ethtezahl\DiceRoller\CupFactory;

// Factory allow us to create dice cup.
$factory = new CupFactory();

// We create the cup that will contain the two die:
$cup = $factory->newInstance('2D6');

// Display the result:
echo $cup->roll();
```

Advanced use: with multiple types of die
----------------------------------------

[](#advanced-use-with-multiple-types-of-die)

Imagine you need to roll three twenty-sided die and one four-sided dice:

```
$cup = $factory->newInstance('3D20+D4');
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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

4

Last Release

3227d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8aae5b2588cd00a3b43f830ed8e1e7696d0ec135475617c01bf71409d03a16c0?d=identicon)[Ethtezahl](/maintainers/Ethtezahl)

---

Tags

dicerollrpg

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ethtezahl-dice-roller/health.svg)

```
[![Health](https://phpackages.com/badges/ethtezahl-dice-roller/health.svg)](https://phpackages.com/packages/ethtezahl-dice-roller)
```

PHPackages © 2026

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