On 02/08/15 10:05, Stanislav Malyshev wrote: >> I'd more than happy to have an spl_object_id() function btw! > I wouldn't be very happy, because it is wrong design to base userland > PHP code on a detail of an implementation of the engine. That's why > there was a hash and not direct ID - so that the code would not depend > on implementation detail and anything that produces different hash for > different objects would work. > The alternative (stuffing the ID into spl_object_hash) is worse however.
What is actually trying to be achieved? A set of objects get created to cache material from another source. One needs a way of identifying the set of buckets which are the raw pointers to each object? Once a bucket is populated then it's identity is part of the bucket. Identifying if a record has already been loaded should happen before wasting the time to download it again? Alternatively a duplicate may be required which retains the same identity until one is happy to replace the original or roll back. The 'identity' is something in the bucket not something that any handle can address? It's implementation not a generic function. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php