Re: [RFC] Deprecations for PHP 8.6
| From: | Tim Düsterhus | Date: | Wed, 01 Jul 2026 17:31:38 +0000 |
| Subject: | Re: [RFC] Deprecations for PHP 8.6 | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-131665@lists.php.net to get a copy of this message | ||
Hi
Am 2026-06-29 20:37, schrieb Seifeddine Gmati:
I'm actually in favor of deprecatingFWIW: I still have a rough draft to makearray()too, and I raised this on the #php-internals Discord channel. The motivation there is weaker though: unlikelist, deprecatingarray()does not free up a keyword, sincearrayremains a type. The grammar simplification and having fewer things for newcomers to learn still apply, and IMO are good reasons on their own. If there's appetite for it, I'm happy to add it to the RFC.
array() (or rather: all non-object types) proper functions that effectively would “stand in” as cast operators. For array() specifically this would allow a named-argument style of defining arrays with “unquoted keys”: array(foo: 1, bar: 2).
Best regards
Tim Düsterhus