Re: [RFC] [Discussion] Support object type in BCMath
| From: | Barney Laurance | Date: | Tue, 26 Mar 2024 18:00:05 +0000 |
| Subject: | Re: [RFC] [Discussion] Support object type in BCMath | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-122762@lists.php.net to get a copy of this message | ||
On 2024-03-24 13:13, Saki Takamachi wrote:
I want to start the discussion on the PHP RFC: Support object type in BCMath.Do we also need
toFloat and toInt functions? Seems like using explicit functions will be safer than casting.
For toInt I'd expect an exception if the value is outside the range of possible ints. For toFloat it might be nice to have a flag
argument to give the developer the choice of having it throw if the value is outside the range of floats or return INF or -INF,
or possibly the user should just check for infinite values themselves.