Re: [RFC] __debug_info()
| From: | Sara Golemon | Date: | Tue, 21 Jan 2014 22:05:18 +0000 |
| Subject: | Re: [RFC] __debug_info() | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-71390@lists.php.net to get a copy of this message | ||
On Tue, Jan 21, 2014 at 1:56 PM, Johannes Schlüter
<johannes@schlueters.de> wrote:
> What impact does this have to debuggers like Xdebug?
>
I'd want Derick to weigh in on that. I'm not sure if XDebug only
looks at the get_properties hook, or considers the get_debug_info hook
as well.
> A comment: PHP in most places like var_dump() usually shows the truth, I
> think that is nice ... reason why internal classes have this hook is
> that there is no truth.
>
I'm not sure I agree with the latter part of that statement. If the
hook existed to allow internal classes to "expose truth", they could
do so via get_properties.
> I assume a cast to array and ReflectionObject will still show the truth?
>
Yes. Cast to array and ReflectionObject::getProperties() both look at
the get_properties handler which is not impacted.
-Sara