Correctly-rounded, arbitrary precision decimal floating-point arithmetic in PHP 7
Switch branches/tags
Nothing to show
Clone or download

README.md

PHP Decimal

Build Status Build status PECL

Correctly-rounded, arbitrary precision decimal floating-point arithmetic in PHP 7.

Documentation

See http://php-decimal.io

Dependencies

sudo apt-get install libmpdec-dev

Install

pecl install decimal

Manual

git clone git@github.com:php-decimal/extension ext-decimal
cd ext-decimal

phpize
./configure
make
sudo make install

Enable

You can do this temporarily using php -dextension=decimal.so or by adding extension=decimal.so to your INI. If you manage PHP with phpbrew, you can use phpbrew ext enable decimal.

Tests

php run-tests.php -P -q