lumisys/bcmath_compat
最新稳定版本:1.0.5.2
Composer 安装命令:
composer require lumisys/bcmath_compat
包简介
PHP 5.x/7.x polyfill for bcmath extension
README 文档
README
PHP 5.x/7.x polyfill for bcmath extension
Installation
With Composer:
$ composer require phpseclib/bcmath_compat
Installation On Heroku
bcmath_compat does not install the normal way on Heroku / Composer < 2.0 because Heroku uses modified composer.json's. Composer 2 makes this a non-issue.
In light of this the way to install this on Heroku with Composer < 2.0 is to do the following:
$ composer require phpseclib/bcmath_compat:1.0.4
Limitations
-
extension_loaded('bcmath')bcmath_compat cannot make this return true. The recommended remediation is to not do this.
-
ini_set('bcmath.scale', ...)You cannot set configuration options for extensions that are not installed. If you do
ini_set('bcmath.scale', 5)on a system without bcmath installed thenini_get('bcmath.scale')will returnfalse. It's similar to what happens when you doini_set('zzz', 5)and thenini_get('zzz'). You'll getfalseback.The recommended remediation to doing
ini_set('bcmath.scale', ...)is to dobcscale(...). The recommended remediation for doingini_getis (if you're using PHP >= 7.3.0) to dobcscale()or (if you're using PHP < 7.3.0) to domax(0, strlen(bcadd('0', '0')) - 2).Note that
ini_getalways returns a string whereas the recommended remediations return integers.
统计信息
- 总下载量: 17.75k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-06-05