[RFC] Deprecate ticks

php.internals

Nikita Popov

5 years ago
Hi internals, I'd like to propose the depreciation of the ticks mechanism: https://wiki.php.net/rfc/deprecate_ticks I'm submitting this separately from the PHP 8.1 deprecations RFC, as this is a language change, even if not a particularly important one... Regards, Nikita

Michał Brzuchalski

5 years ago
Hi Nikita, wt., 11 maj 2021 o 10:53 Nikita Popov <nikita.ppv@gmail.com> napisał(a):
> Hi internals, > > I'd like to propose the depreciation of the ticks mechanism: > https://wiki.php.net/rfc/deprecate_ticks > > I'm submitting this separately from the PHP 8.1 deprecations RFC, as this > is a language change, even if not a particularly important one... >
Glad to see this topic. That's a YES 👍 Cheers, Michał Marcin Brzuchalski

Sebastian Bergmann

5 years ago
Am 11.05.2021 um 11:13 schrieb Michał Marcin Brzuchalski:
> Glad to see this topic. That's a YES 👍
I second that emotion.

Ayesh - PHP.Watch

5 years ago
> > Hi Nikita, > > wt., 11 maj 2021 o 10:53 Nikita Popov <nikita.ppv@gmail.com> napisał(a): > > > Hi internals, > > > > I'd like to propose the depreciation of the ticks mechanism: > > https://wiki.php.net/rfc/deprecate_ticks > > > > I'm submitting this separately from the PHP 8.1 deprecations RFC, as this > > is a language change, even if not a particularly important one... > > > > Glad to see this topic. That's a YES > > Cheers, > Michał Marcin Brzuchalski
I agree too. I can't think of use cases with ticks, other than signal handling or profiling code. We already have better tooling for both of them.

Sara Golemon

5 years ago
On Tue, May 11, 2021 at 3:53 AM Nikita Popov <nikita.ppv@gmail.com> wrote:
> I'd like to propose the depreciation of the ticks mechanism: > https://wiki.php.net/rfc/deprecate_ticks > > I'm submitting this separately from the PHP 8.1 deprecations RFC, as this > is a language change, even if not a particularly important one... > >
I came here to plea for the poor, disrespected ticks function. Then I went to github and asked who was using it... In the 10,000 results which came up for that string in actual PHP code, I paged through the first 20% (2000) cases. They were ALL either a phpt test file, or an auto-generated proxy function (which appears to not actually have any uses). So yeah. Pour one out for ol' ticks. May it rest in peace (following a suitable deprecation period leading up to PHP 9.0). -Sara

Nikita Popov

5 years ago
On Tue, May 11, 2021 at 10:52 AM Nikita Popov <nikita.ppv@gmail.com> wrote:
> Hi internals, > > I'd like to propose the depreciation of the ticks mechanism: > https://wiki.php.net/rfc/deprecate_ticks > > I'm submitting this separately from the PHP 8.1 deprecations RFC, as this > is a language change, even if not a particularly important one... > > Regards, > Nikita >
To cross post a comment from the PR, in https://github.com/php/php-src/pull/6967#issuecomment-841344456 someone mentions that they intercept and rewrite all included files to add declare(ticks=N) in order to perform memory usage / performance monitoring. Regards, Nikita

Nikita Popov

5 years ago
On Thu, Jun 10, 2021 at 3:21 PM Nikita Popov <nikita.ppv@gmail.com> wrote:
> On Tue, May 11, 2021 at 10:52 AM Nikita Popov <nikita.ppv@gmail.com> > wrote: > >> Hi internals, >> >> I'd like to propose the depreciation of the ticks mechanism: >> https://wiki.php.net/rfc/deprecate_ticks >> >> I'm submitting this separately from the PHP 8.1 deprecations RFC, as this >> is a language change, even if not a particularly important one... >> > > To cross post a comment from the PR, in > https://github.com/php/php-src/pull/6967#issuecomment-841344456 someone > mentions that they intercept and rewrite all included files to add > declare(ticks=N) in order to perform memory usage / performance monitoring. >
In the same thread someone points out that there is a WordPress proflinig plugin using the same approach: https://github.com/php/php-src/pull/6967#issuecomment-859124223 I think I'm going to withdraw this RFC. Keeping this functionality is not a particularly large burden on us, and some people are getting some use out of it, even if those uses are rather ... adventurous. Regards, Nikita