[wp-hackers] quick request for fix idea (print_r and returning)

m at tidakada.com m at tidakada.com
Wed Aug 25 15:54:25 UTC 2004


hello,

I'm currently fixing a new xmlrpc.php for WP 1.3 (or maybe it'll be ready
later?) and in the meanwhile fixing bugs I find in the present one.

One of these bugs is related to usage of print_r($somearray, true).
The second argument, used to avoid print_r from outputting stuff to the UA (and
thus to avoid invalid XML errors) only works in PHP 4.3.0 and up.
WP doesn't require PHP 4.3.0 yet, so a solution to this print_r problem is
needed.

So here's the request: can anyone find a way to get a pretty print version of an
array in order to log it when debugging, that works on PHP 4.1.0?
Thanks in advance.

--
Michel
http://zengun.org/weblog/



More information about the hackers mailing list