On 25/09/14 08:44, Leigh wrote:
> On 25 September 2014 08:40, Lester Caine <les...@lsces.co.uk> wrote:
>> >
>> > Why would we need to build a hash of this object? It would provide
>> > nothing of use since we have a clean object key. Some people seem to
>> > think a hash will provide an indication that an object has changed, but
>> > in reality that is also reliant on what information is imported when the
>> > object is loaded.
> Nothing to do with when the object is changed.
> 
> http://php.net/spl_object_hash

'This function returns a unique identifier for the object.'
There is a mistaken view in some usage that that will be DIFFERENT for
different versions of the same object.
So what *IS* returned by spl_object_hash?
The UCN from 7 years ago flags that the identifier is only based on the
internal pointers to the object in memory and that the result is not
user friendly, but without digging into the code, the problems such as
the fact that re-use of the buffer space by a later object cached in the
same buffer may be the same as ID? It is not immediately obvious that
using a buffer to load data to build a more compact array would have the
SAME spl_object_hash for every entry ...

-- 
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

Reply via email to