# [RFC] [Discussion] Arrays starting with a negative index

- Thread: https://externals.io/message/99125
- Original archive: https://news-web.php.net/php.internals/99125
- Started by mail@pmmaga.net on 2017-05-21T15:29:32+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #99125 — mail@pmmaga.net — 2017-05-21T15:29:32+00:00

URL: https://externals.io/message/99125#99125

Hi all,

I have previously discussed this topic here and I have now created an RFC.
The main goal of the RFC is to eliminate the inconsistency in arrays when
negative numeric keys are used explicitly and the following implicit keys
will start from zero.

You can find the RFC here: https://wiki.php.net/rfc/negative_array_index
The previous discussion: https://externals.io/thread/712
And the PR (also some discussion): https://github.com/php/php-src/pull/2383

I also have left the target version as an open issue in case most people
would prefer not to do it in a "minor" version.

Regards,
Pedro Magalhães

---

## #99395 — mail@pmmaga.net — 2017-06-06T11:06:20+00:00

URL: https://externals.io/message/99125#99395 · In reply to: #99125

> Hi all,
>
> I have previously discussed this topic here and I have now created an RFC.
> The main goal of the RFC is to eliminate the inconsistency in arrays when
> negative numeric keys are used explicitly and the following implicit keys
> will start from zero.
>
> You can find the RFC here: https://wiki.php.net/rfc/negative_array_index
> The previous discussion: https://externals.io/thread/712
> And the PR (also some discussion): https://github.
> com/php/php-src/pull/2383
>
> I also have left the target version as an open issue in case most people
> would prefer not to do it in a "minor" version.
>
> Regards,
> Pedro Magalhães
>

Hi all,

Given that I got no more feedback on this, I'm ready to move it to voting.
However, before doing so, I would like to hear some feedback from 7.2 RMs
about the timing. I think the impact in real applications would be pretty
low but there is still the possibility of a subtle BC.

Sara & Remi, would you prefer I wait for the next major for this or would
you be ok with 7.2?

Thanks in advance.

Regards,
Pedro

---

## #99409 — Sara Golemon — 2017-06-06T17:22:36+00:00

URL: https://externals.io/message/99125#99409 · In reply to: #99395

> Given that I got no more feedback on this, I'm ready to move it to voting.
> However, before doing so, I would like to hear some feedback from 7.2 RMs
> about the timing. I think the impact in real applications would be pretty
> low but there is still the possibility of a subtle BC.
>
> Sara & Remi, would you prefer I wait for the next major for this or would
> you be ok with 7.2?
>
I can't see why not. Go for it. Make sure you include a NEWS entry
when (if) you merge it. :D

-Sara

---

## #99410 — mail@pmmaga.net — 2017-06-06T17:37:44+00:00

URL: https://externals.io/message/99125#99410 · In reply to: #99409

> 
> > […]
> voting.
> > […]
> I can't see why not. Go for it. Make sure you include a NEWS entry
> when (if) you merge it. :D
>
> -Sara
>

Thanks for the feedback. Will do :)
Voting announcement will follow shortly.

Regards,
Pedro
