note 76220 added to function.spl-object-hash

From: Date: Thu, 05 Jul 2007 23:40:22 +0000
Subject: note 76220 added to function.spl-object-hash
Groups: php.notes 
Request: Send a blank email to php-notes+get-128254@lists.php.net to get a copy of this message
Note that the contents (properties) of the object are NOT hashed by the function, merely its internal handle and handler table pointer. This is sufficient to guarantee that any two objects simultaneously co-residing in memory will have different hashes. Uniqueness is not guaranteed between objects that did not reside in memory simultaneously, for example: var_dump(spl_object_hash(new stdClass()), spl_object_hash(new stdClass())); Running this alone will usually generate the same hashes, since PHP reuses the internal handle for the first stdClass after it has been dereferenced and destroyed when it creates the second stdClass. ---- Server IP: 64.71.164.2 Probable Submitter: 24.21.139.96 ---- Manual Page -- http://www.php.net/manual/en/function.spl-object-hash.php Edit -- https://master.php.net/note/edit/76220 Del: integrated -- https://master.php.net/note/delete/76220/integrated Del: useless -- https://master.php.net/note/delete/76220/useless Del: bad code -- https://master.php.net/note/delete/76220/bad+code Del: spam -- https://master.php.net/note/delete/76220/spam Del: non-english -- https://master.php.net/note/delete/76220/non-english Del: in docs -- https://master.php.net/note/delete/76220/in+docs Del: other reasons-- https://master.php.net/note/delete/76220 Reject -- https://master.php.net/note/reject/76220 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#128254) next »