#38694 [Opn->WFx]: allow objects to be array keys
| From: | tony2001@php.net | Date: | Mon, 04 Sep 2006 08:27:38 +0000 |
| Subject: | #38694 [Opn->WFx]: allow objects to be array keys | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-101682@lists.php.net to get a copy of this message | ||
ID: 38694
Updated by: tony2001@php.net
Reported By: jerdonek at gmail dot com
-Status: Open
+Status: Wont fix
Bug Type: Feature/Change Request
Operating System: Mac OS X 10.4.7
PHP Version: 5.1.6
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