PHP has a var_dump() function which outputs the internal contents of an object, showing an object\'s type and content.
For example:
You XML serialization, and you should get a very neat representation even of deeply nested objects.