Re: Exposing object handles to userland

From: Date: Sun, 02 Aug 2015 08:58:36 +0000
Subject: Re: Exposing object handles to userland
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-87495@lists.php.net to get a copy of this message
Hi Stas,

thanks for hooking into this thread


However, committing to having specific object ID (e.g. as integer) as
> part of public API is pretty big commitment


This is already part of the public API: var_dump and debug_zval_dump do
expose object IDs to userland. It's just inefficient to get for more
advanced use cases.
Even if its internal implementation is totally different from PHP's, HHVM
adds an id to every object, just for this requirement: matching what PHP
exposes to userland.

I'd more than happy to have an spl_object_id() function btw!

Nicolas


Thread (49 messages)

« previous php.internals (#87495) next »