Re: [PHP-DEV] Indexing an array

2010-08-09 Thread Gustavo Lopes
On Mon, 09 Aug 2010 12:44:03 +0100, mathieu.suen wrote: On 08/06/2010 04:42 PM, Gustavo Lopes wrote: On Fri, 06 Aug 2010 15:33:18 +0100, mathieu.suen wrote: For now you can only index an array using a scalar type or a string. Is there some rfc or work going on to enlarge the possibility s

Re: [PHP-DEV] Indexing an array

2010-08-09 Thread Johannes Schlüter
On Mon, 2010-08-09 at 13:47 +0200, mathieu.suen wrote: > > outputs ... > > > > Array > > ( > > [1365443950] => First > > [1235256771] => Second > > [520059180] => Third > > [486985268] => Fourth > > ) > > Well that is not the expected behavior since if you call array_keys y

Re: [PHP-DEV] Indexing an array

2010-08-09 Thread mathieu.suen
On 08/06/2010 07:46 PM, Stas Malyshev wrote: Hi! For now you can only index an array using a scalar type or a string. Is there some rfc or work going on to enlarge the possibility so that it is possible to have some other object like: I think SplObjectStorage implements most common use-case f

Re: [PHP-DEV] Indexing an array

2010-08-09 Thread mathieu.suen
On 08/06/2010 04:44 PM, Richard Quadling wrote: On 6 August 2010 15:33, mathieu.suen wrote: Hi, For now you can only index an array using a scalar type or a string. Is there some rfc or work going on to enlarge the possibility so that it is possible to have some other object like: - closu

Re: [PHP-DEV] Indexing an array

2010-08-09 Thread mathieu.suen
On 08/06/2010 04:42 PM, Gustavo Lopes wrote: On Fri, 06 Aug 2010 15:33:18 +0100, mathieu.suen wrote: Hi, For now you can only index an array using a scalar type or a string. Is there some rfc or work going on to enlarge the possibility so that it is possible to have some other object like:

Re: [PHP-DEV] Indexing an array

2010-08-07 Thread Ionut G. Stan
On 06/Aug/10 6:20 PM, Hannes Magnusson wrote: On Fri, Aug 6, 2010 at 16:33, mathieu.suen wrote: Hi, For now you can only index an array using a scalar type or a string. Is there some rfc or work going on to enlarge the possibility so that it is possible to have some other object like: I don

Re: [PHP-DEV] Indexing an array

2010-08-06 Thread Stas Malyshev
Hi! For now you can only index an array using a scalar type or a string. Is there some rfc or work going on to enlarge the possibility so that it is possible to have some other object like: I think SplObjectStorage implements most common use-case for such behavior, do you have any other one t

Re: [PHP-DEV] Indexing an array

2010-08-06 Thread Hannes Magnusson
On Fri, Aug 6, 2010 at 16:33, mathieu.suen wrote: > Hi, > > For now you can only index an array using a scalar type or a string. > Is there some rfc or work going on to enlarge the possibility so that it is > possible to have some other object like: > I don't think it makes sense. You can howeve

Re: [PHP-DEV] Indexing an array

2010-08-06 Thread Richard Quadling
On 6 August 2010 15:33, mathieu.suen wrote: > Hi, > > For now you can only index an array using a scalar type or a string. > Is there some rfc or work going on to enlarge the possibility so that it is > possible to have some other object like: > > - closure > - object > - etc. > > Thanks > > -- Ma

Re: [PHP-DEV] Indexing an array

2010-08-06 Thread Gustavo Lopes
On Fri, 06 Aug 2010 15:33:18 +0100, mathieu.suen wrote: Hi, For now you can only index an array using a scalar type or a string. Is there some rfc or work going on to enlarge the possibility so that it is possible to have some other object like: - closure - object - etc. I think the probl

[PHP-DEV] Indexing an array

2010-08-06 Thread mathieu.suen
Hi, For now you can only index an array using a scalar type or a string. Is there some rfc or work going on to enlarge the possibility so that it is possible to have some other object like: - closure - object - etc. Thanks -- Mathieu Suen