Hi

On 9/26/23 12:39, Marc Bennewitz wrote:
I'd like to put a new RFC under discussion:
https://wiki.php.net/rfc/integer-rounding

I find the proposal reasonable, but I don't like the deprecation proposal, because it does not allow me to opt into the *new* behavior before PHP 9.0 arrives.

Getting rid of the deprecation would also require me to either add a cast everywhere or add the error suppression operator everywhere and then revert that with PHP 9 depending on whether I want the new behavior or not.

As far as I can tell all the other deprecations allow me to use the replacement functionality right away without needing to go through a two-step process.

As the results of not casting to float first are arguably more correct, perhaps this could be considered a bugfix. While it would cause breakage for users that rely on strict types, obtaining the old behavior is just one `(float)` cast away.

Best regards
Tim Düsterhus

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to