On Tue, Feb 4, 2014 at 3:47 AM, Crypto Compress
<[email protected]> wrote:
> 1. Can this hook be bypassed or disabled (global/temporary)?
> e.g. real_var_dump(), ini setting, some other flag?
>
No. The existing get_debug_info behavior is always active and this
RFC just lifts it up to the userspace level. Is there a specific use
case for which you'd like that? I suppose you could always do:
var_dump((array)$obj); and get the "real" prop info. In practice, an
object would use this hook to provide better info, keeping
implementation details out of the way (such as current uses in dom,
sxe, mysqli, intl, and spl).
> 2. What will be affected by this hook beside "var_dump"?
> e.g. xdebug output, var_export, ...
>
var_dump() and print_r() are the only current uses of get_debug_info
> 3. How would this behave (segfault?):
> public function __debugInfo() { var_dump($this); return []; }
>
Badly (most likely timeout or memory limit E_ERROR). Don't do that.
-Sara