Re: New function: spl_object_id() or spl_object_handle()
| From: | Bostjan Skufca | Date: | Fri, 28 Nov 2014 19:47:50 +0000 |
| Subject: | Re: New function: spl_object_id() or spl_object_handle() | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-79288@lists.php.net to get a copy of this message | ||
On 28 November 2014 at 07:04, Joe Watkins <pthreads@pthreads.org> wrote:
>
> I don't think so, there is talk of removing object handles in 7.
Could you point me to a discussion about this? Tnx.
> Even if we intended to keep object handles, this leaks implementation
> details that we don't really want leaked.
I understand your concern, but I think being able to uniquely identify
objects should be PHP feature and not a leaked implementation detail.
Looking into other languages:
- ruby has obj.object_id
- python has id(obj) which is functionally equal to spl_object_hash(),
I can not find anything about unique ID for now
- perl has Object::ID module
b.