PHPackages                             lsv/fussball-elo - 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. lsv/fussball-elo

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

lsv/fussball-elo
================

Elo ranking for fussball, with goal difference

2.0(9y ago)132MITPHPPHP ^5.6|^7.0

Since Nov 21Pushed 9y ago2 watchersCompare

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

READMEChangelogDependencies (9)Versions (3)Used By (0)

Fussball Elo Ranking – [![Build Status](https://camo.githubusercontent.com/72a19019a04dafc8ad2bef8d8b91c3dbc40349df546f14d1081c4c5ba0f64558/68747470733a2f2f7472617669732d63692e6f72672f6c73762f666f737362616c6c2d656c6f2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/lsv/fossball-elo)[![codecov](https://camo.githubusercontent.com/aaf7eb9fbd83954f4a812cf1901bf484bbc45f010ad96cd52f9b8e4b81fccf04/68747470733a2f2f636f6465636f762e696f2f67682f6c73762f666f737362616c6c2d656c6f2f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/lsv/fossball-elo)[![SensioLabsInsight](https://camo.githubusercontent.com/e23d7e8becbca07c8eba56acf9d52ff7ec8b8d327239683606c9781a4775af63/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f37343933333435612d633038342d346666342d393839622d3832323836306165333132322f6d696e692e706e67)](https://insight.sensiolabs.com/projects/7493345a-c084-4ff4-989b-822860ae3122)[![StyleCI](https://camo.githubusercontent.com/abe6df12330c259bb062dbc562cf1af92af8e6d8953624e177fc0cc8127aa5c4/68747470733a2f2f7374796c6563692e696f2f7265706f732f37343336343136372f736869656c64)](https://styleci.io/repos/74364167)

=================

Elo ranking calculator, with goal differences

### Install

[](#install)

`composer require lsv/fossball-elo`

or add it to your `composer.json` file

```
"require": {
    "lsv/fossball-elo": "^2.0"
}
```

### Usage

[](#usage)

```
$hometeam_oldRating = 200;
$awayteam_oldRating = 280;

$hometeam_score = 3;
$awayteam_score = 2;

$factor = 20; // Tournament factor
// Normally these are used
// 60 - World Cup
// 50 - Continental Championship and Intercontinental Tournaments
// 40 - World Cup and Continental qualifiers and major tournaments
// 30 - All other tournaments
// 20 - Friendly Matches

use Lsv\FussballElo\Calculator;

$calculator = new Calculator(false);
// Change false to true if you want to give the hometeam a home advance

$ratings = $calculator->getRatings(
    $hometeam_oldRating,
    $awayteam_oldRating,
    $hometeam_score,
    $awayteam_score,
    $factor
);
// $ratings is now a instance of Lsv\FussballElo\Model\Result

$hometeam = $ratings->getHomeTeam();
$awayteam = $ratings->getAwayTeam();

$hometeam->getPointChange(); // Point change in this match for home team
$hometeam->getRating(); // New rating for home team

$awayteam->getPointChange(); // Point change in this match for away team
$awayteam->getRating(); // New rating for away team
```

Its also possible to only get win expectancies

```
$calculator = new Calculator(false);
// Change false to true if you want to give the hometeam a home advance
$resullt = $calculator->getWinExpectancies($hometeam_oldRating, $awayteam_oldRating);
$hometeam = $result->getHomeTeam();
// $hometeam is now a instance of Lsv\FussballElo\Model\TeamWinExpectancies
$awayteam = $result->getAwayTeam();

$hometeam->getWinExpectancies();
// 0.613
$awayteam->getWinExpectancies();
// 0.387

$hometeam->getWinExpectanciesInPercent(1);
// 1 = Number of digits
// 61.3

$awayteam->getWinExpectanciesInPercent(0);
// 39
```

### Versions

[](#versions)

##### 2.\*

[](#2)

- Uses eloratings.net formular
- Hometeam advantage can be used

##### 1.\*

[](#1)

- Uses elo formular from wikipedia

### License

[](#license)

The MIT License (MIT)

Copyright (c) 2016 Martin Aarhof

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

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

Every ~13 days

Total

2

Last Release

3443d ago

Major Versions

1.0 → 2.02016-12-05

### Community

Maintainers

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

---

Top Contributors

[![lsv](https://avatars.githubusercontent.com/u/20708?v=4)](https://github.com/lsv "lsv (7 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/lsv-fussball-elo/health.svg)

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

###  Alternatives

[cubear/finder

Finder is a Drupal 8 module to help users find services which meet their criteria

404.2k](/packages/cubear-finder)

PHPackages © 2026

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