RE: [PHP-DEV] Re: Arrays which have properties of sets

From: Date: Sun, 07 Oct 2012 20:06:56 +0000
Subject: RE: [PHP-DEV] Re: Arrays which have properties of sets
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-63268@lists.php.net to get a copy of this message
> -----Original Message----- > From: Rasmus Schultz [mailto:rasmus@mindplay.dk] > Sent: 07 October 2012 02:10 > To: internals@lists.php.net > Subject: [PHP-DEV] Re: Arrays which have properties of sets > > 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. See SPL's SplObjectStorage. That allows object instances as keys. Jared

« previous php.internals (#63268) next »