Re: Re: Arrays which have properties of sets
| From: | Pierre Joye | Date: | Sun, 07 Oct 2012 09:01:59 +0000 |
| Subject: | Re: Re: Arrays which have properties of sets | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-63267@lists.php.net to get a copy of this message | ||
On Oct 7, 2012 3:10 AM, "Rasmus Schultz" <rasmus@mindplay.dk> wrote:
>
> Since I was the one who started this discussion, I'd like to reply to
> some of these points.
>
> First off, let me say - as you pointed out, when the values are
> unique, they are best represented
> as keys... however, this of course applies only to value-types, which
> isn't the problem, and not
> why I started this conversation in the first place. Objects don't work
> as keys. And objects do
> not always have a value that you can use as keys.
Object hash may be what you are looking for.
http://php.net/manual/en/function.spl-object-hash.php
Cheers,
Pierre