On Tue, Jan 21, 2014 at 1:56 PM, Johannes Schlüter
<[email protected]> 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