PHPackages                             hansott/lottery - 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. hansott/lottery

AbandonedArchivedLibrary

hansott/lottery
===============

Are you feeling lucky? Play the lottery!

1.0.0(9y ago)320MITPHPPHP ~7.0

Since Jun 19Pushed 8y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Lottery
=======

[](#lottery)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e54aeb003d85b54deb0c12f0c13644ec305c1da21d15bf9a88ac162c1b282e26/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68616e736f74742f6c6f74746572792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hansott/lottery)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/e2264f68668834cd99cbfe8f010a817899b7f9edbe6064176842dfbc5ae41f67/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f68616e736f74742f6c6f74746572792f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/hansott/lottery)[![Coverage Status](https://camo.githubusercontent.com/8b01c4e1dc61091b78108ee01acdcf52f4a611fdb97e592f3170965ff1461021/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f68616e736f74742f6c6f74746572792e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/hansott/lottery/code-structure)[![Quality Score](https://camo.githubusercontent.com/d130ddeb2c4f392e7dadabaa27cf6fe5b3c877695d061950b8b2361cb04261d8/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f68616e736f74742f6c6f74746572792e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/hansott/lottery)[![Total Downloads](https://camo.githubusercontent.com/0b2cac70dd1cf2d8cb6c59694a709d6907fef04da57d7a94c3b26ed04a2f9386/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68616e736f74742f6c6f74746572792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/hansott/lottery)

Are you feeling lucky? Play the lottery!

Install
-------

[](#install)

Via Composer

```
$ composer require hansott/lottery
```

Usage
-----

[](#usage)

```
$lotteryFactory = new \HansOtt\Lottery\LotteryFactoryDefault();
$lottery = $lotteryFactory->getLottery();
$ticket = new \HansOtt\Lottery\Ticket(1, 100); // 1% chance to win
$won = $lottery->isLucky($ticket);
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email **hansott at hotmail be** instead of using the issue tracker.

Credits
-------

[](#credits)

- [Hans Ott](https://github.com/hansott)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

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

3610d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7253049a7d2b16789d4fdf1baae498d2e67217fedbb1313a15f20d27493f4f9d?d=identicon)[hansott](/maintainers/hansott)

---

Top Contributors

[![hansott](https://avatars.githubusercontent.com/u/3886384?v=4)](https://github.com/hansott "hansott (8 commits)")

---

Tags

lotteryprobabilityhansott

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/hansott-lottery/health.svg)

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

###  Alternatives

[markrogoyski/math-php

Math Library for PHP. Features descriptive statistics and regressions; Continuous and discrete probability distributions; Linear algebra with matrices and vectors, Numerical analysis; special mathematical functions; Algebra

2.4k7.1M40](/packages/markrogoyski-math-php)[hansott/psr7-cookies

🍪 bakes cookies for PSR-7 messages

402.2M19](/packages/hansott-psr7-cookies)[andreekeberg/abby

🙋‍♀️ Minimal A/B Testing Library

3210.3k](/packages/andreekeberg-abby)[malenki/math

Library to deal with some mathematical stuff. Implemented or partially implemented mathematical concepts are: Complex number, Matrix, Normal distribution, Random, Angle, Random Complex, Descriptive Statistics, Parametric tests (Anova, Dependant t-Test) and Non-Parametric tests (Wilcoxon Signed-rank test, Wilcoxon-Mann-Whitney test, Kruskal-Wallis).

1624.9k](/packages/malenki-math)[cloned/luckybox

A library to pick up the one with a specified probability from some items.

157.3k1](/packages/cloned-luckybox)

PHPackages © 2026

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