phpstorm.dev

PHP ecosystem insights

PHP knowledge

Versioned PHP knowledge with primary sources and explicit verification dates.

Source checks through 2026-10-01 · 43 sources

Verified 2026-10-01 discussion Permanent entry

Array variable shorthand proposal

Under discussion; proposed for PHP 8.7. The current RFC spelling is =$name in array construction and destructuring, representing the explicit key/value form "name" => $name. It applies to [], array() and list().

The earlier :$name spelling was changed because of interaction with ternary syntax. Direct variable names qualify; arbitrary expressions, properties and array dimensions do not. Function-argument shorthand is outside the proposal. The primary page explicitly says that voting has not started.

This is a proposal, not supported stable PHP syntax. Recheck the primary RFC before repeating examples or status.

Related: IO hooks proposal, type declaration milestones.