Doc #60643 [Com]: wrong type for SplObjectStorage::GetHash
| From: | jthijssen at noxlogic dot nl | Date: | Mon, 05 Mar 2012 18:32:12 +0000 |
| Subject: | Doc #60643 [Com]: wrong type for SplObjectStorage::GetHash | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-8024@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
Comment by: jthijssen at noxlogic dot nl
Reported by: jthijssen at noxlogic dot nl
Summary: wrong type for SplObjectStorage::GetHash
Status: Open
Type: Documentation Problem
Package: SPL related
PHP Version: 5.4.0RC4
Block user comment: N
Private report: N
New Comment:
<?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
Previous Comments:
------------------------------------------------------------------------
[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