Re: svn: /phpdoc/en/trunk/reference/spl/functions/ spl-object-hash.xml

From: Date: Thu, 21 Jan 2010 23:20:10 +0000
Subject: Re: svn: /phpdoc/en/trunk/reference/spl/functions/ spl-object-hash.xml
References: 1 2  Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-5911@lists.php.net to get a copy of this message
On Fri, Jan 22, 2010 at 00:09, Hannes Magnusson <hannes.magnusson@gmail.com> wrote: > On Thu, Jan 21, 2010 at 23:58, Daniel Egeberg <degeberg@php.net> wrote: >> degeberg                                 Thu, 21 Jan 2010 22:58:08 +0000 >> >> Revision: >> http://svn.php.net/viewvc?view=revision&revision=293824 >> >> Log: >> Fixed bug #50817 (Dangerously vague documentation for spl_object_hash()) >> >> Bug: http://bugs.php.net/50817 (Open) Dangerously vague >> documentation for spl_object_hash() >> >> Changed paths: >>    U   phpdoc/en/trunk/reference/spl/functions/spl-object-hash.xml >> >> Modified: phpdoc/en/trunk/reference/spl/functions/spl-object-hash.xml >> =================================================================== >> --- phpdoc/en/trunk/reference/spl/functions/spl-object-hash.xml 2010-01-21 20:34:14 UTC >> (rev 293823) >> +++ phpdoc/en/trunk/reference/spl/functions/spl-object-hash.xml 2010-01-21 22:58:08 UTC >> (rev 293824) >> @@ -38,8 +38,8 @@ >>  <refsect1 role="returnvalues"> >>   &reftitle.returnvalues; >>   <para> >> -   A string that is unique for each object and is always the same for >> -   the same object. >> +   A string that is unique for each currently existing object and is always >> +   the same for each object. >>   </para> >>  </refsect1> >> >> @@ -59,7 +59,15 @@ >>    </example> >>   </para> >>  </refsect1> >> - >> + >> + <refsect1 role="notes"> >> +  &reftitle.notes; >> +  <note> >> +   <para> >> +    When an object is destroyed, its hash may be reused for other objects. > > Are you sure this is correct? > There was a lot of discussion about spl_object_hash() before 5.3, and > I thought reusing hashes was one of the things that doesn't happen > anymore? > > -Hannes Well, it seems so. Using the bug reporter's test code: daniel@daniel-laptop:~$ php -v PHP 5.3.1 (cli) (built: Dec 11 2009 19:55:07) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies daniel@daniel-laptop:~$ php -r 'var_dump(spl_object_hash(new stdClass()), spl_object_hash(new stdClass()));' string(32) "000000000ccb5da1000000005fad8b04" string(32) "000000000ccb5da1000000005fad8b04" (output varies of course) -- Daniel Egeberg

« previous php.doc.cvs (#5911) next »