[RFC] Using objects as keys
| From: | Stas Malyshev | Date: | Mon, 27 Oct 2014 01:37:17 +0000 |
| Subject: | [RFC] Using objects as keys | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-78360@lists.php.net to get a copy of this message | ||
Hi!
I would like to present to your attention an RFC about using object as keys:
https://wiki.php.net/rfc/objkey
It was discussed in the past on the list:
http://marc.info/?t=141145969600001&r=1&w=2
and I think it makes sense to propose a formal RFC for it. Both the text
and the code in the patch includes bits done by myself and Joe Watkins.
The patch does not cover 100% of cases but should work for most
reasonable scenarios, if something is wrong or you have ideas how to
make it better please tell.
The name __hash is not final, I am open to using __toKey instead or any
reasonable alternative, we may also include a couple of options in the
vote if that will be a point of disagreement.
Thanks,
Stas