处理特大数字的PHP库.zip

时间:2022-07-31 04:19:23
【文件属性】:
文件名称:处理特大数字的PHP库.zip
文件大小:411KB
文件格式:ZIP
更新时间:2022-07-31 04:19:23
类库下载-处理特大数字的PHP库 <?php namespace Moontoast\Math; class BigNumberTest extends \PHPUnit_Framework_TestCase {     protected function setUp()     {         ini_set('bcmath.scale', 0);     }     /**      * @covers Moontoast\Math\BigNumber::__construct      * @covers Moontoast\Math\BigNumber::getValue      * @covers Moontoast\Math\BigNumber::getScale      * @covers Moontoast\Math\BigNumber::setValue      * @covers Moontoast\Math\BigNumber::filterNumber      * @covers Moontoast\Math\BigNumber::setDefaultScale      */     public function testConstruct()     {         $bn1 = new BigNumber('9,223,372,036,854,775,808');         $this->assertSame('9223372036854775808', $bn1->getValue());         $this->assertEquals(0, $bn1->getScale());         $bn2 = new BigNumber(2147483647);         $this->assertSame('2147483647', $bn2->getValue());         $this->assertEquals(0, $bn2->getScale());这是一份处理特大数字的PHP库,需要的朋友可以下载使用。

网友评论