Re: [RFC] Deprecations for PHP 8.6

From: 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 deprecating array() too, and I raised this on the #php-internals Discord channel. The motivation there is weaker though: unlike list, deprecating array() does not free up a keyword, since array remains 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.
FWIW: I still have a rough draft to make 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

« previous php.internals (#131665) next »