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

Abandoned → [elorating/elorating](/?search=elorating%2Felorating)Library[Utility &amp; Helpers](/categories/utility)

elijahcruz/elo-rating
=====================

Generate ELO ratings for each of your players.

2.0.3(5y ago)2131MITPHPPHP ^7.0|^8.0

Since Jan 17Pushed 5y ago1 watchersCompare

[ Source](https://github.com/elijahcruz12/elo-rating-generator-php)[ Packagist](https://packagist.org/packages/elijahcruz/elo-rating)[ RSS](/packages/elijahcruz-elo-rating/feed)WikiDiscussions master Synced 1mo ago

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

ELO Rating Generating Class
===========================

[](#elo-rating-generating-class)

This is a simple class that allows you to generate an ELO rating for two chess players after a match. Defaults are set to make things even easier. It is also two Class file as well, so check out the source to see how simple it is to work with.

PLEASE NOTE THAT VERSION TWO IS NOT COMPATIBLE WITH VERSION ONE.

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

[](#installation)

### Composer

[](#composer)

The preferred way to install this extension is through [Composer](http://getcomposer.org/).

```
composer require elorating/elorating

```

Usage
-----

[](#usage)

First, create two players with current ratings. This allows you to get their ratings in a quick way:

```
use EloRating\Player;

$player1 = new Player(1200);
$player2 = new Player(800);
```

Next create a match.

```
use EloRating\Game;

$match = new Game($player1, $player2);
```

If you chose to set the K for the ELO Score, you can, however the default K is 32:

```
$match->setK(16);
```

After the match is complete, you can set the score and run the count method to recaculate the new scores. The score is done for player one, then player two.

```
$match->setScore(0, 1)
   ->count();
```

Get players:

```
$player1 = $match->getPlayer1();
$player2 = $match->getPlayer2();
```

Get their new ratings after the match:

```
$newRating1 = $player1->getRating();
$newRating2 = $player2->getRating();
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity62

Established project with proven stability

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 ~2 days

Total

6

Last Release

1930d ago

Major Versions

1.0.1 → 2.0.02021-01-17

PHP version history (2 changes)1.0.0PHP ^7.4|^8.0

2.0.0PHP ^7.0|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3cd86be6ae99ffef0c65552b89e188d783330f4f33af68e9b7a08dc1fd60ee77?d=identicon)[elijahcruz12](/maintainers/elijahcruz12)

---

Tags

chess

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[lukasss93/minecraft-server-status

PHP library to check Minecraft Servers Status

425.1k](/packages/lukasss93-minecraft-server-status)

PHPackages © 2026

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