Re: [RFC] Deprecations for PHP 8.6
| From: | Juliette Reinders Folmer | Date: | Wed, 01 Jul 2026 22:38:07 +0000 |
| Subject: | Re: [RFC] Deprecations for PHP 8.6 | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-131688@lists.php.net to get a copy of this message | ||
On 1-7-2026 23:35, Seifeddine Gmati wrote:
Please look again on the same page. The _recommended_ version may be PHP 8.3, the minimum version ("Running on legacy versions?") is PHP 7.4 and only since recently.Sorry to butt in, but a) the minimum PHP for WP is PHP 7.4I got the 8.3 number from their official website: https://wordpress.org/about/requirements/ , even if the requirement is 7.1, the[]syntax works fine there. So, this is not a problem.
That's just plain untrue. The one is used for creating an array, the other for destructuring an array. Swapping* Code accessibility - it is much quicker to determine whether something is a list or an array when visually scanning code when the keywords are being used.list(does not mean a "list", PHP has no such type right now. It means you are destructuring an array,list("foo" => $bar)is valid. so "quicker to determine" is false, you can swap everylist(usage witharray(and the behavior will be exactly the same.
list( usages with array( will in most cases result in a parse error. Example: https://3v4l.org/O7O4q#veol
Smile, Juliette* Searchability of the code base - searching forYes, it would also yieldarray(orlist(will yield useful results, searching for[will yield a hundred times more results, most of which are not what one is looking for (array access, assignments etc).$typed->array(,$posts->list(, and more. If you are looking for a specific syntax, you should use AST based search tools, not grep text. In which case, you can easily grep for array construction using[]over writes/reads using array-access syntax. This has never been a problem in every other language that uses[]syntax. Agreed, but that doesn't take anything away from the fact that WP uses it as an argument against switching to the short syntax.