定制 alexsabdev/odds 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 8
  • Watchers: 0
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-05-20