Hi Sara,
https://wiki.php.net/rfc/debug-info
>
I can't resist telling you about
patchwork/dumper<https://github.com/nicolas-grekas/Patchwork-Dumper>because
it has all you seem to look for.
Except internal info that are hidden from user land, it has a higher
accuracy than var_dump(), because it can dump soft *and* hard references
inside complex data structures. It also offers tailor made output with the
ability to enrich objects/resources with custom
"casters"<https://github.com/nicolas-grekas/Patchwork-Dumper/tree/master/class/Patchwork/Dumper/Caster>
.
Maybe this can fuel some ideas?
For example, I would suggest that any error thrown from a call to
__debugInfo() should be ignored by var_dump()/print_r().
Cheers,
Nicolas