For arbitrary precision mathematics PHP offers the Binary Calculator which supports numbers of any size and precision, represented as strings.
Since PHP 4.0.4, libbcmath is bundled with PHP. You don't need any external libraries for this extension.
These functions are only available if PHP was configured with --enable-bcmath. In PHP 3, these functions are only available if PHP was not configured with --disable-bcmath.
PHP 的 Windows 版本已經內置該擴充功能的支援。無需載入任何附加擴充功能即可使用這些函式。
這些函式的行為受 php.ini 的影響。
Name | Default | Changeable | Changelog |
---|---|---|---|
bcmath.scale | "0" | PHP_INI_ALL |
以下是設定選項的簡要解釋。
本擴充功能未定義任何資源類型。
本擴充功能未定義任何常數。