Hi! On Sun, Sep 3, 2023 at 3:14 PM Tim Düsterhus <t...@bastelstu.be> wrote:
> > The RFC mentions already has a section with regard to naming: > > > Why not the names PHP_ROUND_UP and PHP_ROUND_DOWN > > I generally agree with the argument in favor of the names you've chosen. > However they are inconsistent with the existing 'PHP_ROUND_HALF_UP' / > DOWN constants. > > I don't want to create extra work for you, but I wonder if additionally > one of the following should be done: > > - Creating PHP_ROUND_HALF_AWAY_FROM_ZERO as an alias for > PHP_ROUND_HALF_UP (and likewise for HALF_DOWN). > > I believe consistency is important and using UP for "away from zero" and DOWN for "towards zero" sounds good to me. That was so far used consistently everywhere, as far as I'm aware. Documentation is very clear about what they mean, and you can always think that both positive infinity and negative infinity are up while zero is down. Yes, we can have some extra constants for the four ones that contain "up" or "down" with "away from zero" and "towards zero", but I find it unnecessary. Regards, Alex