Re: [RFC] Deprecations for PHP 8.6

From: Date: Wed, 01 Jul 2026 21:35:03 +0000
Subject: Re: [RFC] Deprecations for PHP 8.6
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-131683@lists.php.net to get a copy of this message
> Sorry to butt in, but a) the minimum PHP for WP is PHP 7.4 I 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. > * 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 every list( usage with array( and the behavior will be exactly the same. > * Searchability of the code base - searching for array( or > list( 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). Yes, it would also yield $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. > Other than that, they've brought up practical reasons for not switching to the new syntax > in the past. Think along the lines of there being thousands of (often long-standing) open patches, > which would need to be updated before they can be merged. The extra burden this would put on the > limited amount of committers is another reason. Again, i don't think the language should be held down because of a single project when the migration path is available, and works for all supported versions of that project, whether it's WordPress or any other. Cheers, Seifeddine.

« previous php.internals (#131683) next »