Hi

On 11/3/23 21:51, Jakub Zelenka wrote:
The main reason I would like to see this deprecated is not the fact that
it's returning a less precise value compared to getrusage, but rather
because it's returning a value that cannot be interpreted in any way
from pure PHP.

So if the constant is added, which is trivial, then the only reason left is
that it's returning slightly less precise value and maybe slightly harder
way to interpret it, right? If so, then I don't think this is enough to
break BC. It would be much better done using documentation where we should
also add a note about the new constant.

There is no real backwards-compatibility break, because the function was not correctly usable in the first place. This means that anyone who currently uses the function already has broken code.

An actual deprecation would make any existing user of the function aware of the fact that their code is broken. Just adding the necessary constant will not unbreak existing broken code, it will just enable users to use the function correctly going forward, *if* they read the documentation. Users relying on existing tutorials or StackOverflow answers will continue to have broken code.

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