Re: [PHP-DEV][RFC] Normalize array's "auto-increment" value on copy on write

2019-06-30 Thread Niklas Keller
> Maybe it would be good to add a secondary vote to decide if this should be > implemented in PHP 7.4 or PHP 8. Missed that, it should definitely target PHP 8, not 7.4. Regards, Niklas -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV][RFC] Normalize array's "auto-increment" value on copy on write

2019-06-29 Thread Arnold Daniels
On Thu, 20 Jun 2019, 19:06 Rowan Collins, wrote: > On Thu, 20 Jun 2019 at 13:11, Wes wrote: > > > I left that out of scope for the RFC, for reasons I don't have the > > knowledge to describe properly. In the following example, `unset()` > should > > reset the auto increment to `1` only after

Re: [PHP-DEV][RFC] Normalize array's "auto-increment" value on copy on write

2019-06-20 Thread Rowan Collins
On Thu, 20 Jun 2019 at 13:11, Wes wrote: > I left that out of scope for the RFC, for reasons I don't have the > knowledge to describe properly. In the following example, `unset()` should > reset the auto increment to `1` only after the third `unset()` call > > ``` > $array = [0, 1, 2, 3]; //

Re: [PHP-DEV][RFC] Normalize array's "auto-increment" value on copy on write

2019-06-20 Thread Wes
I left that out of scope for the RFC, for reasons I don't have the knowledge to describe properly. In the following example, `unset()` should reset the auto increment to `1` only after the third `unset()` call ``` $array = [0, 1, 2, 3]; // auto increment is 4 because there are "holes" in the

Re: [PHP-DEV][RFC] Normalize array's "auto-increment" value on copy on write

2019-06-20 Thread Niklas Keller
Hi Wes, I don't think it'll work the way you described. I think we have to make the auto-increment value be entirely dependent on the values in the array for it to work. Consider the following example combining your initial assertion in the RFC with an example further down: ```

Re: [PHP-DEV][RFC] Normalize array's "auto-increment" value on copy on write

2019-06-20 Thread Nikita Popov
On Thu, Jun 20, 2019 at 1:45 AM Wes wrote: > Hello internals, I just published another RFC > > https://wiki.php.net/rfc/normalize-array-auto-increment-on-copy-on-write > > Please keep in mind that my intentions are good and I am proposing things > in the interest of everybody. Also, I am aware

[PHP-DEV][RFC] Normalize array's "auto-increment" value on copy on write

2019-06-19 Thread Wes
Hello internals, I just published another RFC https://wiki.php.net/rfc/normalize-array-auto-increment-on-copy-on-write Please keep in mind that my intentions are good and I am proposing things in the interest of everybody. Also, I am aware that I might be wrong. If I am, please illustrate the