Is it possible to hide a specific class fields from print_r ?
Both print_r() and var_dump() will give you everything.
Various Reflection
classes have a getDocComment()
method to get the /** doc comment */
for classes, methods and properties.
Utilising doc comments to denote what should and should not be output, you can quite easily create a dumping class to achieve what you want.