Re: Introducing 2 new modes to round function
| From: | Mark Baker | Date: | Thu, 03 Aug 2023 08:28:02 +0000 |
| Subject: | Re: Introducing 2 new modes to round function | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-120876@lists.php.net to get a copy of this message | ||
Once upon a many years ago: https://github.com/php/php-src/pull/1658
It will be nice to see it finally get and implementation
On 21/07/2023 21:26, Jorg Sowa wrote:
Hello internals!
I would like to propose introducing two new modes to the function
round(): PHP_ROUND_DOWN and PHP_ROUND_UP.
Those modes are highly requested as you can see by the comments on round
documentation page. First comment mentioning about those modes has 309
votes as of today. Introducing those 2 modes would be complementing to the
rounding in this function.
Round documentation: https://www.php.net/manual/en/function.round.php
My implementation: https://github.com/php/php-src/pull/11741
I'm not sure if such minor improvement requires RFC, but as someone may
have some concerns I create this thread to get your feedback.
Kind regards,
Jorg
--
Mark Baker