spl_object_hash: what is it good for??
16 April 2011
Is it possible to do anything useful with PHP’s
spl_object_hash() function? It returns an identifier when passed an object, but:
- If the object is destroyed, the identifier can be re-used.
- If the object is changed, the identifier stays the same.
(In having these two properties, it seems as though the identifier is essentially equivalent to the address of the object in memory.) What on earth is this for?