Hello Internals.
Today I'm fighting with some code that I think uses var_dump() and output
buffering to create the output for __debugInfo... or something like that -
I'm not really interested into finding the cause :P

Anyway, It's not the first time I find myself paralyzed by a slightly
broken __debugInfo, including with code that I've written myself (I hate
that guy).

One big problem is that once you have overriden it in a super class, you
can't revert __debugInfo back to the php's implementation easily; the
following doesn't actually do the same thing:

function __debugInfo(){ return (array)$this; }

But even better, it would be nice if debug_zval_dump() always returned the
debug information unaffected by custom user-defined __debugInfo. This is by
the way what HHVM does: https://3v4l.org/OoJkC

Thoughts?

Reply via email to