PHPackages                             alexsabdev/odds - 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. alexsabdev/odds

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

alexsabdev/odds
===============

PHP package for dealing with different formats of betting odds: decimal (European), fractional (British), and moneyline (American)

v1.0.0(8y ago)85.9k↓33.3%3[1 PRs](https://github.com/alexsabdev/odds/pulls)MITPHPPHP ^7.1

Since May 20Pushed 4y agoCompare

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

READMEChangelogDependencies (2)Versions (2)Used By (0)

odds [![Build Status](https://camo.githubusercontent.com/da90596c86fc1ad196dede00be3950c897afb3d1357c5490ebb1bac0a5fcbf46/68747470733a2f2f7472617669732d63692e6f72672f616c65787361626465762f6f6464732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/alexsabdev/odds)
=================================================================================================================================================================================================================================================================================

[](#odds-)

PHP package for dealing with different formats of betting odds: decimal (European), fractional (British), and moneyline (American)

Features
--------

[](#features)

- Use classes of Decimal/fractional/moneyline odds
- Convert values of odds (all directions)

Requirements
------------

[](#requirements)

- PHP 7.1+
- Composer

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

[](#installation)

- Require the package using Composer

```
composer require alexsabdev/odds
```

Usage
-----

[](#usage)

- Create an instance of any odd

```
require 'vendor/autoload.php';

use Alexsabdev\Odds\DecimalOdd;
...

$odd = new DecimalOdd(3.5);
```

- Show the value

```
/**
* Prints '3.5'
*/
$decimal = $odd->value();
print_r($decimal);
```

- Convert to other odds

```
/**
* Prints '5/2'
*/
$fractional = $odd->toFractional()->value();
print_r($fractional);

/**
* Prints '+250'
*/
$moneyline = $odd->toMoneyline()->value();
print_r($moneyline);
```

License
-------

[](#license)

This is an open-sourced software licensed under the [MIT license](https://github.com/alexsabdev/convrtr/blob/master/LICENSE).

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community8

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

2920d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14823114?v=4)[Alex](/maintainers/alexsabdev)[@alexsabdev](https://github.com/alexsabdev)

---

Top Contributors

[![alexsabdev](https://avatars.githubusercontent.com/u/14823114?v=4)](https://github.com/alexsabdev "alexsabdev (12 commits)")

---

Tags

bettingoddsdecimal oddeuropean oddfractional oddbritish oddamerican oddmoneyline odd

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/alexsabdev-odds/health.svg)

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

PHPackages © 2026

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