The `Formatter` class uses `print_r($var, true)` to format an object by default. This works most of the time, but will result in an endless stream of garbage if the variable contains circular references. The symfony VarDumper component looks pretty promising. Seems like it allows you to limit depth.