Re: [PHP-DEV] Proposal: Add ReverseArrayIterator and ForwardArrayIterator to SPL

2021-02-08 Thread Alexandru Pătrănescu
> > > I'll code this up soon unless someone objects. I'm very open to naming > suggestions for a better performing, simpler array iterator. > ListIterator or ArrayListIterator, as we are using the array as a list only, ordered, of key-value pairs...

Re: [PHP-DEV] Proposal: Add ReverseArrayIterator and ForwardArrayIterator to SPL

2021-02-08 Thread Levi Morrison via internals
On Wed, Feb 3, 2021 at 8:50 AM Nikita Popov wrote: > > On Wed, Feb 3, 2021 at 4:38 PM Levi Morrison wrote: > > > Hello, everyone! > > > > This proposal adds two new classes to the SPL: > > > > - `Spl\ReverseArrayIterator`. It iterates over an array in reverse > > order. It does not duplicate th

Re: [PHP-DEV] Proposal: Add ReverseArrayIterator and ForwardArrayIterator to SPL

2021-02-03 Thread Nikita Popov
On Wed, Feb 3, 2021 at 5:09 PM Levi Morrison wrote: > On Wed, Feb 3, 2021 at 8:50 AM Nikita Popov wrote: > > > > On Wed, Feb 3, 2021 at 4:38 PM Levi Morrison wrote: > >> > >> Hello, everyone! > >> > >> This proposal adds two new classes to the SPL: > >> > >> - `Spl\ReverseArrayIterator`. It i

Re: [PHP-DEV] Proposal: Add ReverseArrayIterator and ForwardArrayIterator to SPL

2021-02-03 Thread Levi Morrison
On Wed, Feb 3, 2021 at 8:50 AM Nikita Popov wrote: > > On Wed, Feb 3, 2021 at 4:38 PM Levi Morrison wrote: >> >> Hello, everyone! >> >> This proposal adds two new classes to the SPL: >> >> - `Spl\ReverseArrayIterator`. It iterates over an array in reverse >> order. It does not duplicate the arr

Re: [PHP-DEV] Proposal: Add ReverseArrayIterator and ForwardArrayIterator to SPL

2021-02-03 Thread Nikita Popov
On Wed, Feb 3, 2021 at 4:38 PM Levi Morrison wrote: > Hello, everyone! > > This proposal adds two new classes to the SPL: > > - `Spl\ReverseArrayIterator`. It iterates over an array in reverse > order. It does not duplicate the array. > - `Spl\ForwardArrayIterator`. It iterates over an array

[PHP-DEV] Proposal: Add ReverseArrayIterator and ForwardArrayIterator to SPL

2021-02-03 Thread Levi Morrison
Hello, everyone! This proposal adds two new classes to the SPL: - `Spl\ReverseArrayIterator`. It iterates over an array in reverse order. It does not duplicate the array. - `Spl\ForwardArrayIterator`. It iterates over an array in forward (normal) order. It does not duplicate the array. They