Hi

On 6/3/24 18:21, Derick Rethans wrote:
But they're well established in existing PHP features.

That does not mean that we shouldn't attempt to do better for newly introduced APIs. Over time there will be more developers that will newly learn PHP than there are developers that already know PHP’s standard library in detail.

Of course that does not mean that we should break consistency with existing functionality without good justification, but in the case of the `RoundingMode` enum, the enum is self-contained and with the addition of the new rounding modes in PHP 8.4 [1], the existing `ceil()` and `floor()` functions are redundant with the capabilities of `round()`. Anyone who newly learns PHP would get all the functionality by just using `round()` together with one of the self-explanatory rounding modes provided by the proposed `RoundingMode` enum.

Best regards
Tim Düsterhus

[1] https://wiki.php.net/rfc/new_rounding_modes_to_round_function

Reply via email to