PHPackages                             linkprofit-cpa/chance - 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. linkprofit-cpa/chance

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

linkprofit-cpa/chance
=====================

Probability calculator

1.1.1(6y ago)266[1 PRs](https://github.com/linkprofit-cpa/chance/pulls)MITPHPPHP &gt;=7.2.0

Since Oct 24Pushed 5y ago3 watchersCompare

[ Source](https://github.com/linkprofit-cpa/chance)[ Packagist](https://packagist.org/packages/linkprofit-cpa/chance)[ Docs](https://github.com/linkprofit-cpa/chance)[ RSS](/packages/linkprofit-cpa-chance/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (2)Versions (5)Used By (0)

Chance
======

[](#chance)

[![Latest Stable Version](https://camo.githubusercontent.com/0b5400ee9e286f5c5208f41a97107532eba5a8058ee03ac172026535ea2ea713/68747470733a2f2f706f7365722e707567782e6f72672f6c696e6b70726f6669742d6370612f6368616e63652f762f737461626c65)](https://packagist.org/packages/linkprofit-cpa/chance)[![Build Status](https://camo.githubusercontent.com/d176d695d0ab47f831a4bfb31b17bd2242db3e60ded3bbd4cd70e800ffa6c9f7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c696e6b70726f6669742d6370612f6368616e63652f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/linkprofit-cpa/chance/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/0057d7446f71dd2624db496a821ea26ab2f61d9c13bb41a99564f5eb5b853519/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c696e6b70726f6669742d6370612f6368616e63652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/linkprofit-cpa/chance/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/3b752548aa9c3dcd9e18965acae94001ad214d764e03526e14652eb18d8f215b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6c696e6b70726f6669742d6370612f6368616e63652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/linkprofit-cpa/chance/?branch=master)[![License](https://camo.githubusercontent.com/01a8c86a73106460f0e2974d1f6cc3d32bb585327775bad5294adb52396808c1/68747470733a2f2f706f7365722e707567782e6f72672f6c696e6b70726f6669742d6370612f6368616e63652f6c6963656e7365)](https://packagist.org/packages/linkprofit-cpa/chance)

Описание
--------

[](#описание)

Библиотека для расчёта шанса с заданной вероятностью

Примеры
-------

[](#примеры)

```
// Получить шанс в одной пятой случаев
$chance = new Chance(new Ratio(5));

// Получить шанс в 25%
$chance = new Chance(new Percent(25));

if ($chance->get()) {
    ...
}
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.6% 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 ~144 days

Total

3

Last Release

2469d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9060150?v=4)[Konstantin](/maintainers/Phrlog)[@Phrlog](https://github.com/Phrlog)

![](https://www.gravatar.com/avatar/c171f2966ae0908bc06e7a1cb586483a65edc32f38c7db26ee7cd663fad01d87?d=identicon)[nafigat0r](/maintainers/nafigat0r)

![](https://www.gravatar.com/avatar/2bea1b84b4d10cc72a6fca3c5bff2e8f95f263a9f75f4e4221860c4c44827926?d=identicon)[linkprofit-cpa](/maintainers/linkprofit-cpa)

---

Top Contributors

[![nafigator](https://avatars.githubusercontent.com/u/1971423?v=4)](https://github.com/nafigator "nafigator (22 commits)")[![Phrlog](https://avatars.githubusercontent.com/u/9060150?v=4)](https://github.com/Phrlog "Phrlog (3 commits)")[![konorlevich](https://avatars.githubusercontent.com/u/15093064?v=4)](https://github.com/konorlevich "konorlevich (1 commits)")

---

Tags

calculatorchance

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/linkprofit-cpa-chance/health.svg)

```
[![Health](https://phpackages.com/badges/linkprofit-cpa-chance/health.svg)](https://phpackages.com/packages/linkprofit-cpa-chance)
```

###  Alternatives

[markrogoyski/ipv4-subnet-calculator

Network calculator for subnet mask and other classless (CIDR) network information.

177813.7k6](/packages/markrogoyski-ipv4-subnet-calculator)[ballen/distical

A distance (Lat/Long) calculation library for PHP

40180.2k2](/packages/ballen-distical)

PHPackages © 2026

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