Re: New function: spl_object_id() or spl_object_handle()
| From: | Rowan Collins | Date: | Tue, 09 Dec 2014 19:32:57 +0000 |
| Subject: | Re: New function: spl_object_id() or spl_object_handle() | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-79513@lists.php.net to get a copy of this message | ||
On 9 December 2014 16:43:52 GMT, Nicolas Grekas <nicolas.grekas+php@gmail.com> wrote:
>Indeed. A non-function version of debug_zval_dump which could do this
>on
>> any variable would be even better (if I read it right, your function
>only
>> works on array members?)
>>
>
>Not sure this is required: any variable can be put in an array for this
>purpose thanks to get_defined_vars() and the (array) cast operator for
>objects.
Sure, but like the function call, doing so just to send it to the debugger changes some of the
information you're trying to see - it must increase the refcount, and in some situations could
presumably mess up references too.
It would also be nice if you didn't have to think about such things, and could just use it on
any variable reference, like you could isset().
--
Rowan Collins
[IMSoP]