Am 27.10.2014 02:37 schrieb "Stas Malyshev" <smalys...@gmail.com>: > > I would like to present to your attention an RFC about using object as keys: > >https://wiki.php.net/rfc/objkey
I don't like this, mainly because it blocks a future direct use and storage of objects as keys in an array, i.e. what SplObjectStorage does. It is also badly named, because it does NOT implement objects as keys. It implements deriving surrogate keys from objects when used in an array key context. This is not what other languages do. Python, for example, uses a combination of __hash__ and __eq__ (or __cmp__), the former to locate the hash slot, and the latter to then check for equality when running the hash chain anchored in that slot. The thing stored as a key, is the real object. See https://wiki.python.org/moin/DictionaryKeys best regards Patrick