edwardbrosens/bcmath 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

edwardbrosens/bcmath

Composer 安装命令:

composer require edwardbrosens/bcmath

包简介

Convenience wrapper for the php bcmath extension.

README 文档

README

Convenience wrapper for the php bcmath extension.

Installation

To install BCMath, run:

$ composer require edwardbrosens/bcmath

Requirements

BCMath works with at least PHP 5.6 and HHVM.

Quick Start

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

use \BCMath\BCMath;

// Add two arbitrary precision numbers
$a = BCMath::add(1, 2); // ($a = 3)
$b = BCMath::sub(2, 1); // ($b = 1)

Available Methods

BCMath::add($left_operand, $right_operand, $scale = null); // Add two arbitrary precision numbers
BCMath::sub($left_operand, $right_operand, $scale = null); // Subtract two arbitrary precision numbers
BCMath::mul($left_operand, $right_operand, $scale = null); // Multiply two arbitrary precision numbers
BCMath::div($left_operand, $right_operand, $scale = null); // Divide two arbitrary precision numbers
BCMath::mod($left_operand, $modulus); // Get modulus of an arbitrary precision number
BCMath::pow($left_operand, $right_operand, $scale = null); // Raise an arbitrary precision number to another
BCMath::sqrt($operand, $scale = null); // Get the square root of an arbitrary precision number
BCMath::scale ($scale); // Set default scale parameter for all BCMath and bcmath functions
BCMath::comp($left_operand, $right_operand, $scale = null); // Compare two arbitrary precision numbers
BCMath::powmod($left_operand, $right_operand, $modulus, $scale = null); // Raise an arbitrary precision number to another, reduced by a specified modulus

Run Tests

To run tests:

$ git clone https://github.com/edwardbrosens/BCMath.git
$ composer install
$ ./vendor/bin/phpunit

Contribute

  1. Fork the repository on GitHub in order to make changes.
  2. Write one or more tests for the new feature you're implementing or a fix for the bug you found.
  3. Send a pull request to get your branch merged.

统计信息

  • 总下载量: 8
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-01-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固