library odds
PHP package for dealing with different formats of betting odds: decimal (European), fractional (British), and moneyline (American)
alexsabdev/odds
PHP package for dealing with different formats of betting odds: decimal (European), fractional (British), and moneyline (American)
- Monday, May 21, 2018
- by alexsabdev
- Repository
- 1 Watchers
- 0 Stars
- 15 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 400 % Grown
odds
PHP package for dealing with different formats of betting odds: decimal (European), fractional (British), and moneyline (American), (*1)
Features
- Use classes of Decimal/fractional/moneyline odds
- Convert values of odds (all directions)
Requirements
Installation
- Require the package using Composer
composer require alexsabdev/odds
Usage
- Create an instance of any odd
require 'vendor/autoload.php';
use Alexsabdev\Odds\DecimalOdd;
...
$odd = new DecimalOdd(3.5);
/**
* Prints '3.5'
*/
$decimal = $odd->value();
print_r($decimal);
/**
* Prints '5/2'
*/
$fractional = $odd->toFractional()->value();
print_r($fractional);
/**
* Prints '+250'
*/
$moneyline = $odd->toMoneyline()->value();
print_r($moneyline);
License
This is an open-sourced software licensed under the MIT license., (*2)
dev-master
9999999-dev
https://github.com/alexsabdev/odds
PHP package for dealing with different formats of betting odds: decimal (European), fractional (British), and moneyline (American)
Sources
Download
MIT
The Requires
The Development Requires
betting
odds
decimal odd
european odd
fractional odd
british odd
american odd
moneyline odd
v1.0.0
1.0.0.0
https://github.com/alexsabdev/odds
PHP package for dealing with different formats of betting odds: decimal (European), fractional (British), and moneyline (American)
Sources
Download
MIT
The Requires
The Development Requires
betting
odds
decimal odd
european odd
fractional odd
british odd
american odd
moneyline odd