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. Introdu
Hey Jorg,
What is the reason for using this over these?
* https://www.php.net/manual/en/function.ceil.php
* https://www.php.net/manual/en/function.floor.php
On Fri, 21 Jul 2023, 21:26 Jorg Sowa, wrote:
> Hello internals!
>
> I would like to propose introducing two new modes to the function
On Jul 21, 2023, at 12:38, Marco Pivetta wrote:
> Hey Jorg,
>
> What is the reason for using this over these?
>
> * https://www.php.net/manual/en/function.ceil.php
> * https://www.php.net/manual/en/function.floor.php
floor() and ceil() don't have a $precision parameter.
What could be even more
On 21 July 2023 21:38:03 CEST, Marco Pivetta wrote:
> Hey Jorg,
>
> What is the reason for using this over these?
>
> * https://www.php.net/manual/en/function.ceil.php
> * https://www.php.net/manual/en/function.floor.php
>
>
Hey Marco
floor and ceil convert a float to the next int.
round ca
On Fri, 21 Jul 2023, 22:05 Dusk, wrote:
> On Jul 21, 2023, at 12:38, Marco Pivetta wrote:
> > Hey Jorg,
> >
> > What is the reason for using this over these?
> >
> > * https://www.php.net/manual/en/function.ceil.php
> > * https://www.php.net/manual/en/function.floor.php
>
> floor() and ceil() do
Thank you for your suggestions. I added two remaining modes and I think
it's complete now.
I changed the names to `PHP_ROUND_CEILING` and `PHP_ROUND_FLOOR` to be
consisted with rounding modes in number_format() function. I'm not sure
about `PHP_TOWARD_ZERO` and 'PHP_AWAY_FROM_ZERO` as in there it'