Re: [RFC] Deprecations for PHP 8.6
| From: | Rowan Tommins [IMSoP] | Date: | Mon, 22 Jun 2026 16:11:17 +0000 |
| Subject: | Re: [RFC] Deprecations for PHP 8.6 | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-131462@lists.php.net to get a copy of this message | ||
On 22 June 2026 14:13:19 BST, "Gina P. Banyard" <internals@gpb.moe> wrote:
>Hello internals,
>
>It is this time of year again where we proposed a list of deprecations to add in PHP 8.6:
>
>https://wiki.php.net/rfc/deprecations_php_8_6
The one that stands out to me at first glance is the _() alias for gettext()
I understand the motivation, but removing it is likely to be extremely disruptive, particularly
paired with banning it as an identifier so users can't polyfill it.
_() is basically the canonical way to use gettext in every language it's been ported to. The
idea is that you can write code and templates with hard-coded English/base-language strings, and
wrap them with a small amount of punctuation rather than extra words.
While replacement would be relatively straightforward, affected codebases are likely to have
thousands of uses, and the end result would be a reduction in readability.
If we want to go down this route, we need a stronger justification than is given - does it actually
cause a *problem* reserving it only in class-like context, or is the proposal just for neatness?
Rowan Tommins
[IMSoP]