Re: Re: [RFC] [Discussion] Add 4 new rounding modes to round() function
| From: | G. P. B. | Date: | Wed, 04 Oct 2023 23:26:22 +0000 |
| Subject: | Re: Re: [RFC] [Discussion] Add 4 new rounding modes to round() function | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-121223@lists.php.net to get a copy of this message | ||
On Wed, 4 Oct 2023 at 23:23, Jorg Sowa <jorg.sowa@gmail.com> wrote:
> Thank you all for the discussion. I modified description of the RFC and
> added deprecation of constants ROUND_UP and ROUND_DOWN from Intl extension
> as an additional voting.
>
> Thanks also for input about possible mode ROUND_STOCHASTIC, however I think
> it's the idea for the extension and not the addition to the standard
> functions.
>
> I would like to start the voting in coming days.
>
I don't think deprecating the constants in the version where the aliases
are introduced is a good idea.
There needs to be at least one version where both variants exist to allow
for cross version compatibility.
I will also echo Tim's idea of using an enum instead and a union type.
For the namespace, I think it would make sense to use Maths\RoundingMode
Best regards,
George P. Banyard