Apart from the aforementioned array cast which is both easy and fast.
It's not easy nor fast to change output of a whole object graph.
Changing class definitions/methods of whole object graph is obviously not an option.
Casting to array is of no help as only for current object and only for public props.
Personally, I think the potential for improving debug output far
outweighs the potential for abusing it to hide important info.
-Sara
Yes, so why not add extra method for this? "pretty_dump()"
This "abuse" is way common then you think (99%?).