Re: [RFC] Short Array Variable Shorthand

From: Date: Wed, 30 Sep 2026 06:45:56 +0000
Subject: Re: [RFC] Short Array Variable Shorthand
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-132705@lists.php.net to get a copy of this message
Greetings, On 29/09/2026 20:44, Weilin Du wrote:
$point = [:$x, :$y, :$z]; // ['x' -> $x, 'y' -> $y, 'z' -> $z]
$point = compact('x', 'y', 'z');
is still not deprecated so is $x = $y = $z = null; extract($point, EXTR_IF_EXISTS); but you probably should use neither. -- Anton

« previous php.internals (#132705) next »