On Mon, Sep 11, 2017 at 8:36 AM, Christoph M. Becker <cmbecke...@gmx.de> wrote: > I already have proposed to introduce bcinit() which would take a string, > int or float, and return a properly formatted string with the given or > default scale, see <https://github.com/php/php-src/pull/2746>. Nikita > suggested to accept the arguments allowed by `bcinit()` for all > functions in the first place. This would, however, raise the question > which scale should be applied to floats. > I agree with Nikita. Given that current behavior for floats passed to bc*() obey EG(precision), I'd say we should retain that behavior in these explicit conversions. That way existing (functional) uses aren't impacted, we just quietly start working on other cases (where scientific notation and/or non-period delimiters would have been used).
> Before proceeding to an RFC (if necessary at all), I'm looking forward > to hear your thoughts regarding this topic. > IMO, this falls under fixing an existing bug (bc*() functions don't accept certain types of floats), so it wouldn't need an RFC to be accepted. I would wait a little bit to get feedback on the scale question before merging though. I would even offer that we could apply this to 7.[012] safely. -Sara -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php