On 22 June 2026 14:13:19 BST, "Gina P. Banyard" <[email protected]> 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]

Reply via email to