On 27/10/14 08:09, Stas Malyshev wrote: > Hi! > >> 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 does not. It just allows the objects to control how they are seen > when they are used as keys in regular PHP arrays. That does not prevent > SplObjectStorage or anything else from doing whatever one wants. I > personally would say SplObjectStorage probably should respect __hash if > provided, but we can discuss it separately.
Do we want to consider to let core use spl_object_hash() if ::__hash() is not implemented, so objects can always be used as keys? -- Regards, Mike -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php