fruitcake / php-decimal
Decimal class for PHP
Fund package maintenance!
barryvdh
fruitcake.nl
Requires
- php: ^8.1
Requires (Dev)
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^10
- squizlabs/php_codesniffer: ^3.7
This package is auto-updated.
Last update: 2024-11-11 09:34:45 UTC
README
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.