{Object|Array|Anything} to string with respect to recursion limit in PHP?
<p>Is there a straightforward way in PHP to get an arbitrary complex value into a string without triggering recursion limits? For example, passing an hugely nested object and specifying I want only 2 levels deep. </p>

<p>What I want to avoid is getting an error on var_export or var_dump, even if that means that I get less accurate output.</p>

<p>Thanks!</p>

<p>Clarification: I want to use the string for logging usage, so debuggers are not applicable.</p>
