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

Carthik Sharma carthik at gmail.com
Wed Aug 25 16:02:39 UTC 2004


I am sorry if you've already seen this, but there are a few user comments here :
http://us4.php.net/print_r
with a couple of them discussing how to do what you need to do. I
think it  may help.

On Wed, 25 Aug 2004 15:54:25 +0000, m at tidakada.com <m at tidakada.com> wrote:
> 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/
> 
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org
> 


-- 
When nothing is done, nothing is left undone -- 老子 Lǎozi

University of Central Florida
Homepage: http://carthik.net



More information about the hackers mailing list