PHPackages                             ouxsoft/luckbydice - 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. ouxsoft/luckbydice

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

ouxsoft/luckbydice
==================

A library for simulating dice rolls written in PHP.

v2.2.0(4y ago)07.6k1[1 issues](https://github.com/ouxsoft/LuckByDice/issues)1MITPHPPHP ^7.3 || ^8.0

Since Feb 19Pushed 4y ago1 watchersCompare

[ Source](https://github.com/ouxsoft/LuckByDice)[ Packagist](https://packagist.org/packages/ouxsoft/luckbydice)[ Docs](https://github.com/ouxsoft/LuckByDice)[ RSS](/packages/ouxsoft-luckbydice/feed)WikiDiscussions main Synced 5d ago

READMEChangelog (9)Dependencies (4)Versions (17)Used By (1)

[![LuckByDice](https://raw.githubusercontent.com/Ouxsoft/LuckByDice/main/docs/logo.png)](https://raw.githubusercontent.com/Ouxsoft/LuckByDice/main/docs/logo.png)
=================================================================================================================================================================

[](#)

[![CI](https://github.com/Ouxsoft/LuckByDice/actions/workflows/ci.yml/badge.svg)](https://github.com/Ouxsoft/LuckByDice/actions/workflows/ci.yml)[![Code Quality](https://camo.githubusercontent.com/ec1afcac3415163e30664c1b84fb76c2da6ca8effbb0b15592dc80280bc6e569/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3038636539613466396432303431656438643831356666366164363634323432)](https://www.codacy.com/gh/Ouxsoft/LuckByDice/dashboard?utm_source=github.com&utm_medium=referral&utm_content=ouxsoft/LuckByDice&utm_campaign=Badge_Grade)[![Codacy Badge](https://camo.githubusercontent.com/19c7fd30b8c92666a84789c2c9084ba9598b179fd78d8539a95f2709b157bfd3/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f436f7665726167652f3038636539613466396432303431656438643831356666366164363634323432)](https://www.codacy.com/gh/Ouxsoft/LuckByDice/dashboard?utm_source=github.com&utm_medium=referral&utm_content=ouxsoft/LuckByDice&utm_campaign=Badge_Coverage)[![Docs Status](https://camo.githubusercontent.com/b7af681e88858bcbb777cb19f40c67336f08ba218c714ee1f6f6b43991a8f968/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f6c75636b6279646963652f62616467652f3f76657273696f6e3d6c6174657374267374796c653d666c6174)](https://readthedocs.org/projects/luckbydice)

[![Latest Stable Version](https://camo.githubusercontent.com/3a61aebb8368c959d11d37a01cee8458289cbeddd0f0a93dbbba05806d891bed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f4f7578736f66742f4c75636b4279446963652e737667)](https://packagist.org/packages/Ouxsoft/LuckByDice)[![PHP Versions Supported](https://camo.githubusercontent.com/b18d2475e08a00899316a7f0b8898bc91d5a1bcdbf0590b9eb169e037ac0367c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d372e33253230746f253230382e312d3737376262332e7376673f6c6f676f3d706870266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d353535353535)](https://api.travis-ci.com/Ouxsoft/LuckByDice.svg?branch=master&status=passed)[![License](https://camo.githubusercontent.com/b7f987d9672849c198f174fdcafb8cc6d9878e439d03e9403c34683de445b87e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d3432386637652e7376673f6c6f676f3d6f70656e253230736f75726365253230696e6974696174697665266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d353535353535)](https://github.com/Ouxsoft/LuckByDice/blob/master/LICENSE)[![Total Downloads](https://camo.githubusercontent.com/8dc3705fc6e6a2a449eba7ae22539086a0a2731d5cfab9ddfba2076e9da7ce2a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f4f7578736f66742f4c75636b4279446963652e737667)](https://packagist.org/packages/Ouxsoft/LuckByDice)[![Slack](https://camo.githubusercontent.com/dc9879339d565cf523dc47e6f7a61382275d756e6beff6ff0741259f541121ec/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f736c61636b2d6c75636b6279646963652d707572706c65)](https://ouxsoft.slack.com/archives/C02FR135CN9)

Got Dice?
---------

[](#got-dice)

Run your dice notation using [Docker](https://www.docker.com/products/docker-desktop):

```
$ docker run ouxsoft/luckbydice:latest bin/luckbydice d3,4d6+1,5d+1*2

```

[![CLI Test Example](https://raw.githubusercontent.com/ouxsoft/LuckByDice/main/docs/interactive-test.gif)](https://raw.githubusercontent.com/ouxsoft/LuckByDice/main/docs/interactive-test.gif)

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

[](#installation)

Install using [Composer](https://getcomposer.org/download/):

```
$ composer require ouxsoft/luckbydice
```

Basic Usage
-----------

[](#basic-usage)

```
