Re: [PHP-DEV] [RFC] Allow non-scalar keys in foreach

2013-02-25 Thread Nikita Popov
On Tue, Feb 19, 2013 at 3:12 PM, Etienne Kneuss wrote: > > > > On Tue, Feb 19, 2013 at 2:55 PM, Derick Rethans wrote: > >> Gah, no top posting! >> >> On Tue, 19 Feb 2013, Etienne Kneuss wrote: >> >> > On Tue, Feb 19, 2013 at 2:25 PM, Derick Rethans wrote: >> > >> > > On Tue, 19 Feb 2013, Nikita

Re: [PHP-DEV] [RFC] Allow non-scalar keys in foreach

2013-02-19 Thread Levi Morrison
>> > I think the warning can stay as-is, __toString is not necessarily >> > available so casting to string in all occasions is probably not what >> > we want. >> >> I think it should cast to a string if possible. You are now making >> iterator_to_array not work with the new feature, and I find that

Re: [PHP-DEV] [RFC] Allow non-scalar keys in foreach

2013-02-19 Thread Etienne Kneuss
On Tue, Feb 19, 2013 at 2:55 PM, Derick Rethans wrote: > Gah, no top posting! > > On Tue, 19 Feb 2013, Etienne Kneuss wrote: > > > On Tue, Feb 19, 2013 at 2:25 PM, Derick Rethans wrote: > > > > > On Tue, 19 Feb 2013, Nikita Popov wrote: > > > > > > > This RFC proposes to remove the type-restrict

Re: [PHP-DEV] [RFC] Allow non-scalar keys in foreach

2013-02-19 Thread Derick Rethans
Gah, no top posting! On Tue, 19 Feb 2013, Etienne Kneuss wrote: > On Tue, Feb 19, 2013 at 2:25 PM, Derick Rethans wrote: > > > On Tue, 19 Feb 2013, Nikita Popov wrote: > > > > > This RFC proposes to remove the type-restrictions on Iterator keys > > > used in foreach: > > > > > > https://wiki.p

Re: [PHP-DEV] [RFC] Allow non-scalar keys in foreach

2013-02-19 Thread Etienne Kneuss
I think the warning can stay as-is, __toString is not necessarily available so casting to string in all occasions is probably not what we want. I'm glad somebody could take this over and provide a complete patch, thanks Nikita! On Tue, Feb 19, 2013 at 2:25 PM, Derick Rethans wrote: > On Tue, 1

Re: [PHP-DEV] [RFC] Allow non-scalar keys in foreach

2013-02-19 Thread Nikita Popov
On Tue, Feb 19, 2013 at 2:25 PM, Derick Rethans wrote: > On Tue, 19 Feb 2013, Nikita Popov wrote: > > > This RFC proposes to remove the type-restrictions on Iterator keys > > used in foreach: > > > > https://wiki.php.net/rfc/foreach-non-scalar-keys > > > > I took over Levi's RFC and added a patch

Re: [PHP-DEV] [RFC] Allow non-scalar keys in foreach

2013-02-19 Thread Derick Rethans
On Tue, 19 Feb 2013, Nikita Popov wrote: > This RFC proposes to remove the type-restrictions on Iterator keys > used in foreach: > > https://wiki.php.net/rfc/foreach-non-scalar-keys > > I took over Levi's RFC and added a patch for it. Under "Open Questions" you write: > What should be done wi

[PHP-DEV] [RFC] Allow non-scalar keys in foreach

2013-02-19 Thread Nikita Popov
Hi internals! This RFC proposes to remove the type-restrictions on Iterator keys used in foreach: https://wiki.php.net/rfc/foreach-non-scalar-keys I took over Levi's RFC and added a patch for it. Thoughts? Nikita