2017 © Pedro Peláez
 

library bcmath

Object wrapper for PHP BcMath Library

image

webit/bcmath

Object wrapper for PHP BcMath Library

  • Friday, January 26, 2018
  • by dbojdo
  • Repository
  • 2 Watchers
  • 10 Stars
  • 3,190 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 6 Forks
  • 0 Open issues
  • 5 Versions
  • 13 % Grown

The README.md

Object wrapper for PHP BcMath Library

This library provides immutable representation of BcMath number supporting all BcMath extension operations (see http://php.net/manual/en/book.bc.php), (*1)

Installation

Composer: add the webit/bcmath into composer.json, (*2)

{
    "require": {
        "php": ">=7.1.0",
        "webit/bcmath": "^2.0.0"
    }
}

Usage

    $num = new BcMathNumber('123.1233');
    $result = $num->add('13.22')->mul('3.05');
    echo $result . "\n";

Release note

This version 2.0 breaks a backward compatibility. Since now BcMathNumber: * is marked final * constants are marked private * works only for PHP >= 7.1, (*3)

Version 1.1 breaks a backward compatibility. Since now BcMathNumber: * is immutable (removed setValue method) * has no instance property scale (removed instance methods getScale / setScale) as number itself can't have a scale, (*4)

To use previous version see tag 1.0.0 https://github.com/dbojdo/bcmath/tree/1.0.0, (*5)

Tests

docker-compose run --rm src composer install
docker-compose run --rm phpunit

The Versions

26/01 2018

dev-master

9999999-dev

Object wrapper for PHP BcMath Library

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-bcmath *

 

The Development Requires

bcmath big numeric

26/01 2018

1.2.1

1.2.1.0

Object wrapper for PHP BcMath Library

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-bcmath *

 

The Development Requires

bcmath big numeric

25/02 2017

1.2.0

1.2.0.0

Object wrapper for PHP BcMath Library

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-bcmath *

 

bcmath big numeric

20/07 2015

1.1.0

1.1.0.0

Object wrapper for PHP BcMath Library

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-bcmath *

 

bcmath big numeric

09/05 2015

1.0.0

1.0.0.0

Object wrapper for PHP BcMath Library

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

bcmath big numeric