Re: [DISCUSSION] bcmath: adding bcgetopts() and bcsetopts() to get or set bcmath options
| From: | Ayesh Karunaratne | Date: | Wed, 16 Jul 2025 11:56:55 +0000 |
| Subject: | Re: [DISCUSSION] bcmath: adding bcgetopts() and bcsetopts() to get or set bcmath options | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-128077@lists.php.net to get a copy of this message | ||
> Would adding a bcgetopts(): int and a bcsetopts(int $opts): void calls
> be useful?
>
> At this time there's no way to influence bcmath's behavior other than
> bcscale().
>
How about adding these as methods/properties to the
BcMath\Number class?
BcMath\Number does not use the bcmath.scale INI directive, and in
my opinion, it is the correct way to do it. Everything that affects
the operations are just there in the code, and there is no hidden
global state.