Doc #60643 [Asn->Csd]: wrong type for SplObjectStorage::GetHash
| From: | salathe@php.net | Date: | Fri, 22 Jun 2012 20:51:02 +0000 |
| Subject: | Doc #60643 [Asn->Csd]: wrong type for SplObjectStorage::GetHash | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-8496@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60643&edit=1
ID: 60643
Updated by: salathe@php.net
Reported by: jthijssen at noxlogic dot nl
Summary: wrong type for SplObjectStorage::GetHash
-Status: Assigned
+Status: Closed
Type: Documentation Problem
Package: SPL related
PHP Version: 5.4.0RC4
Assigned To: salathe
Block user comment: N
Private report: N
New Comment:
The type hint for the $object parameter has been updated, as well has a few other
small changes for that page. Thanks!
Previous Comments:
------------------------------------------------------------------------
[2012-06-22 20:49:32] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&revision=326298
Log: minor improvements for SplObjectStorage::getHash() (doc #60643)
------------------------------------------------------------------------
[2012-03-05 18:32:11] jthijssen at noxlogic dot nl
<?php
$store = new SplObjectStorage();
$obj = new StdClass();
print $store->getHash($obj);
print $store->getHash("obj");
Output:
0000000041d100cf0000000071936ee6
Warning: SplObjectStorage::getHash() expects parameter 1 to be object, string given in
/home/jthijssen/php-src/sapi/cli/test.php on line 9
------------------------------------------------------------------------
[2012-02-24 17:55:30] kissifrot at gmail dot com
Can you give a reproduce code ?
------------------------------------------------------------------------
[2012-01-03 16:03:05] jthijssen at noxlogic dot nl
Description:
------------
The SplObjectStorage::GetHash suggests that $object is of type 'string', while in fact,
this should be type 'object', as suggested in the code.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60643&edit=1