2017-25 © Pedro Peláez
 

library odds

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

image

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

The README.md

odds Build Status

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

  • PHP 7.1+
  • Composer

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);
  • 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

This is an open-sourced software licensed under the MIT license., (*2)

The Versions

21/05 2018

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

  • php ^7.1

 

The Development Requires

betting odds decimal odd european odd fractional odd british odd american odd moneyline odd

20/05 2018

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

  • php ^7.1

 

The Development Requires

betting odds decimal odd european odd fractional odd british odd american odd moneyline odd