Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

PHP 5.x-8.x polyfill for bcmath extension.

License

NotificationsYou must be signed in to change notification settings

phpseclib/bcmath_compat

Repository files navigation

Software LicenseCI Status

PHP 5.x-8.x polyfill for bcmath extension

Installation

WithComposer:

$ composer require phpseclib/bcmath_compat

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 doini_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 getfalse back.

    The recommended remediation to doingini_set('bcmath.scale', ...) is to dobcscale(...). The recommended remediation for doingini_get is (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 thatini_get always returns a string whereas the recommended remediations return integers.


[8]ページ先頭

©2009-2025 Movatter.jp