Re: [PHP-DEV] [RFC] Deprecations for PHP 8.6

[email protected] (Nick Sdot)
Newsgroups php.internals
Message-ID <[email protected]>
On 30.06.26 00:37, Seifeddine Gmati wrote:
> Hello Internals,
>
> I have updated the RFC to include a deprecation proposal for the
> `list()` construct.
>
> ref: https://wiki.php.net/rfc/deprecations_php_8_6#deprecate_the_list_construct
>
> Cheers,
> Seifeddine.


Hey Seifeddine

with you here on the problems with list(); that it should be deprecated 
and go eventually. Though, you get quite some resistance with strong 
arguments.

You said in one of your answers something like "one project holding back 
the PHP language". While in essence true, Wordpress is not just any 
project -- it's still the biggest multiplicator for PHP usage. The 
amount of deprecation logs printed on a daily basis, the amount of 
support generated, and the general impact will be huge.

I know that's not what you signed up for when adding this deprecation to 
the RFC, but perhaps getting `list()` as language construct deprecated 
would be easier if there would be an actual function replacement like 
`array_destruct()` that would address the readability argument (which is 
hard to discuss away because it is hyper subjective). Generally, there 
is nothing wrong with having a short and long syntax -- we do have the 
same with control flows and such.

Of course I don't mean to ask you to withdraw the deprecation proposal 
here. However, in case it fails the above perhaps could bring this 
forward (probably together with solutions for `array()` and 
`var_export()` :)).

--

Cheers
Nick
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.