alexsabdev/odds
最新稳定版本:v1.0.0
Composer 安装命令:
composer require alexsabdev/odds
包简介
PHP package for dealing with different formats of betting odds: decimal (European), fractional (British), and moneyline (American)
关键字:
README 文档
README
PHP package for dealing with different formats of betting odds: decimal (European), fractional (British), and moneyline (American)
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.
统计信息
- 总下载量: 5.68k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-05-20