[RFC][VOTE] Spread Operator in Array Expression v0.2

  105325
April 21, 2019 19:40 me@jhdxr.com (=?utf-8?b?Q0hVIFpoYW93ZWk=?=)
------=_NextPart_000_000A_01D4F8BD.2C47D700
Content-Type: text/plain;
	charset="gb2312"
Content-Transfer-Encoding: quoted-printable

Hi internals,

=20

Since there is no more questions for more than one week, I=A1=AFve =
opened the
vote on the spread operator in array expression RFC. The vote lasts two
weeks and it closes at  7-May.

=20

https://wiki.php.net/rfc/spread_operator_for_array#vote

=20

=20

Regards,

CHU Zhaowei


------=_NextPart_000_000A_01D4F8BD.2C47D700--
  105329
April 22, 2019 14:13 levim@php.net (Levi Morrison)
On Sun, Apr 21, 2019 at 1:41 PM CHU Zhaowei <me@jhdxr.com> wrote:
> Since there is no more questions for more than one week, I’ve opened the > vote on the spread operator in array expression RFC. The vote lasts two > weeks and it closes at 7-May. > > https://wiki.php.net/rfc/spread_operator_for_array#vote
I've hesitantly voted yes. I am unsure about the behavior with references. This was brought up during discussion, but never really addressed. It seems that this behavior is the same for `array_merge`. It seems acceptable, though I am unsure if it is desirable or not.
  105645
May 8, 2019 18:14 me@jhdxr.com (=?utf-8?b?Q0hVIFpoYW93ZWk=?=)
------=_NextPart_000_023E_01D5060C.FF8DE080
Content-Type: text/plain;
	charset="gb2312"
Content-Transfer-Encoding: 7bit

Sorry for the one day delay. This RFC has passed with 43 votes in favor and
1 against. 

 

Thanks & Regards,

CHU Zhaowei 

 


------=_NextPart_000_023E_01D5060C.FF8DE080--
  105696
May 14, 2019 11:00 nikita.ppv@gmail.com (Nikita Popov)
On Wed, May 8, 2019 at 8:15 PM CHU Zhaowei <me@jhdxr.com> wrote:

> Sorry for the one day delay. This RFC has passed with 43 votes in favor and > 1 against. > > > > Thanks & Regards, > > CHU Zhaowei >
I've merged the implementation for this RFC yesterday. However, I would like to propose adding one extra restriction, implemented in https://github.com/php/php-src/pull/4162. Currently, the implementation allows writing things like this: [42 => 0, ...$array] ['a' => 'b', ...$array] I think that with the current behavior of ..., where string keys are forbidden and integer keys are reindexed, it would be best to make these usages illegal as well, at least for the time being. Especially to avoid tying our hands too much when it comes to adding the [$head, ...$tail] = syntax in the future. Nikita