#38694 [WFx]: allow objects to be array keys
| From: | jerdonek at gmail dot com | Date: | Mon, 04 Sep 2006 18:39:24 +0000 |
| Subject: | #38694 [WFx]: allow objects to be array keys | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-101721@lists.php.net to get a copy of this message | ||
ID: 38694
User updated by: jerdonek at gmail dot com
Reported By: jerdonek at gmail dot com
Status: Wont fix
Bug Type: Feature/Change Request
Operating System: Mac OS X 10.4.7
PHP Version: 5.1.6
New Comment:
Won't fix ever? What's the rationale?
Previous Comments:
------------------------------------------------------------------------
[2006-09-02 22:02:13] jerdonek at gmail dot com
Description:
------------
Arrays and objects are not currently allowed as keys.
Instead of:
$values[$object] = 0;
the programmer is forced to create string or integer keys for
all objects we want to use as keys:
$values[$object->id] = 0;
I'm sure this has been mentioned before, but I couldn't find
anything in the feature requests. So I am making a formal
request. I know Python and Ruby allow this. Thanks.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38694&edit=1