long sum
1.0.0
一个 PHP 类,用于对很长的数字求和。
例子:
$ result = LongSum:: Sum (
' 111222000111000222000111000000000445 ' ,
' 111333000111000333000111000000000555 '
);
echo $ result ; // 222555000222000555000222000000001000
克隆项目:
git clone https://github.com/elmao79/long-sum.git
创建执行测试的 Docker 容器:
cd long-sum/Docker
docker-compose up -d
安装依赖项(PHPUnit):
docker exec -it php-long-sum composer install
执行测试:
docker exec -it php-long-sum composer test