Re: [RFC] [Discussion] Support object type in BCMath
| From: | Saki Takamachi | Date: | Tue, 26 Mar 2024 13:35:13 +0000 |
| Subject: | Re: [RFC] [Discussion] Support object type in BCMath | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-122751@lists.php.net to get a copy of this message | ||
Hi Aleksander,
> Was BCMath\Number considered instead of BcNum?
Yes, that was one of the candidates. However, as far as I know, there are no examples of PHP
internal classes having namespaces.
Also, if use a namespace, the code will be written as
new Number(), which is likely to
conflict with existing code. In fact, if take a look at GitHub Code Search, you'll find 3.2k
results.
https://github.com/search?type=code&auto_enroll=true&q=%22new+Number%28%22+language%3APHP+
This won't result in a BC Break, but it can be a bit difficult to use.
> ps. there's '2,111' in one place, but should be '2.111', I guess.
Oops, thank you. You have good eyes.
Regards.
Saki