PHPackages                             chovanec/elo-rating - 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. chovanec/elo-rating

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

chovanec/elo-rating
===================

A PHP implementation of Elo rating system

12074634[1 PRs](https://github.com/Chovanec/elo-rating/pulls)PHP

Since Sep 13Pushed 4y ago9 watchersCompare

[ Source](https://github.com/Chovanec/elo-rating)[ Packagist](https://packagist.org/packages/chovanec/elo-rating)[ RSS](/packages/chovanec-elo-rating/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Elo Rating PHP
==============

[](#elo-rating-php)

A PHP class which implements the [Elo rating system](http://en.wikipedia.org/wiki/Elo_rating_system).

Install with composer
=====================

[](#install-with-composer)

`composer require chovanec/elo-rating dev-master`

Link to Packagist.org:

Usage
=====

[](#usage)

```
require 'src/Rating/Rating.php';

// player A elo = 1000
// player B elo = 2000
// player A lost
// player B win

$rating = new Rating(1000, 2000, Rating::LOST, Rating::WIN);

// player A elo = 1000
// player B elo = 2000
// player A draw
// player B draw

$rating = new Rating(1000, 2000, Rating::DRAW, Rating::DRAW);

$results = $rating->getNewRatings();

echo "New rating for player A: " . $results['a'];
echo "New rating for player B: " . $results['b'];

```

---

Credits
=======

[](#credits)

[![Creative Commons License](https://camo.githubusercontent.com/3a18a398ebf9c68728504c490308489eb6803705d9250b66950a2c53a3b36978/68747470733a2f2f692e6372656174697665636f6d6d6f6e732e6f72672f6c2f62792f342e302f38307831352e706e67)](http://creativecommons.org/licenses/by/4.0/)
Elo Rating PHP by [Michal Chovanec](http://michalchovanec.com) is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.1% 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.

### Community

Maintainers

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

---

Top Contributors

[![Chovanec](https://avatars.githubusercontent.com/u/1430817?v=4)](https://github.com/Chovanec "Chovanec (37 commits)")[![Sysix](https://avatars.githubusercontent.com/u/3897725?v=4)](https://github.com/Sysix "Sysix (3 commits)")[![bryant1410](https://avatars.githubusercontent.com/u/3905501?v=4)](https://github.com/bryant1410 "bryant1410 (1 commits)")[![lambeletjp](https://avatars.githubusercontent.com/u/2329886?v=4)](https://github.com/lambeletjp "lambeletjp (1 commits)")[![mfrankiewicz](https://avatars.githubusercontent.com/u/18583662?v=4)](https://github.com/mfrankiewicz "mfrankiewicz (1 commits)")[![priyeshpatel](https://avatars.githubusercontent.com/u/545296?v=4)](https://github.com/priyeshpatel "priyeshpatel (1 commits)")

### Embed Badge

![Health badge](/badges/chovanec-elo-rating/health.svg)

```
[![Health](https://phpackages.com/badges/chovanec-elo-rating/health.svg)](https://phpackages.com/packages/chovanec-elo-rating)
```

PHPackages © 2026

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