Am 16.12.2014 12:36 schrieb "Matteo Beccati" <p...@beccati.com>:
>
> On 16/12/2014 11:52, Andrea Faulds wrote:
>>
>> I was previously in favour of this, but it’d prevent actual indexing
>> by objects in future, and I can’t think of any use cases which aren’t
>> better solved by explicitly converting to a string/integer.
>
> That's precisely the same reason why I voted Nay. And I wouldn't have
been able to put it down in words better than Andrea did.

That was my thought initially, too. But I think it is wrong. If PHP ever
gets around to provide objects-themselves-as-array-keys support, it can
easily do that

1) only if the object does not have such a __toKey() method, or
2) if the object has one, but it returns the object itself (which is
forbidden now by the RFC)

best regards
  Patrick

Reply via email to