# [RFC] Deprecate ticks

- Thread: https://externals.io/message/114368
- Original archive: https://news-web.php.net/php.internals/114368
- Started by Nikita Popov on 2021-05-11T08:52:42+00:00
- Messages: 7
- RFC: Deprecate ticks (Withdrawn) — https://externals.io/rfc/deprecate_ticks.md
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #114368 — Nikita Popov — 2021-05-11T08:52:42+00:00

URL: https://externals.io/message/114368#114368

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

---

## #114370 — michal.brzuchalski@gmail.com — 2021-05-11T09:13:09+00:00

URL: https://externals.io/message/114368#114370 · In reply to: #114368

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

---

## #114376 — Sebastian Bergmann — 2021-05-11T12:12:00+00:00

URL: https://externals.io/message/114368#114376 · In reply to: #114370

Am 11.05.2021 um 11:13 schrieb Michał Marcin Brzuchalski:
> Glad to see this topic. That's a YES 👍

I second that emotion.

---

## #114377 — Ayesh Karunaratne — 2021-05-11T12:40:59+00:00

URL: https://externals.io/message/114368#114377 · In reply to: #114370

>
> Hi Nikita,
>
> wt., 11 maj 2021 o 10:53 Nikita Popov <nikita.ppv@gmail.com> napisał(a):
>
> > […]
>
> 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.

---

## #114384 — Sara Golemon — 2021-05-11T14:25:55+00:00

URL: https://externals.io/message/114368#114384 · In reply to: #114368

> 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

---

## #114811 — Nikita Popov — 2021-06-10T13:21:19+00:00

URL: https://externals.io/message/114368#114811 · In reply to: #114368

> 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

---

## #115170 — Nikita Popov — 2021-06-28T12:54:11+00:00

URL: https://externals.io/message/114368#115170 · In reply to: #114811

> On Tue, May 11, 2021 at 10:52 AM Nikita Popov <nikita.ppv@gmail.com>
> wrote:
>
> > […]
>
> 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
