Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 1.28 KB

README.md

File metadata and controls

32 lines (21 loc) · 1.28 KB

Decimal class for PHP

Unit Tests PHPStan Level 5 Code Coverage Packagist License Latest Stable Version Total Downloads Fruitcake

Library for handling decimals in PHP

Installation

Require fruitcake/php-decimal using composer.

Example: using the library

<?php

use Fruitcake\Decimal\Decimal;

$decimal = new Decimal('1');
$value = $decimal->sub('0.8');

echo $decimal->toString(2); // "0.20"

License

Released under the MIT License, see LICENSE.