Re: Deprecate posix_times
| From: | Tim Düsterhus | Date: | Sat, 04 Nov 2023 11:40:34 +0000 |
| Subject: | Re: Deprecate posix_times | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-121581@lists.php.net to get a copy of this message | ||
Hi
On 11/3/23 21:51, Jakub Zelenka wrote:
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üsterhusThe 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.