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

php.internals

Pedro Magalhães

9 years ago
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

Pedro Magalhães

9 years ago
On Sun, May 21, 2017 at 5:29 PM, Pedro Magalhães <mail@pmmaga.net> wrote:
> 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

Sara Golemon

9 years ago
On Tue, Jun 6, 2017 at 7:06 AM, Pedro Magalhães <mail@pmmaga.net> wrote:
> 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

Pedro Magalhães

9 years ago
On Tue, Jun 6, 2017 at 7:22 PM, Sara Golemon <pollita@php.net> wrote:
> On Tue, Jun 6, 2017 at 7:06 AM, Pedro Magalhães <mail@pmmaga.net> wrote: > > 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 >
Thanks for the feedback. Will do :) Voting announcement will follow shortly. Regards, Pedro