note 10718 deleted from function.print-r by philip

From: Date: Tue, 04 Dec 2001 02:23:00 +0000
Subject: note 10718 deleted from function.print-r by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-21583@lists.php.net to get a copy of this message
It would be nice to have a version of this function that did not go straight to the output. mail("bill@hatemail.msn.com", "debug email", print_rr($some_data_array) ); Or $array_report = print_rr($some_object); $some_object.do_something(); $array_report .= "\nobject state after do_something:\n".print_rr($some_object); mail(you get the idea) That way you would not kill your sessions/cookies/headers by sending to the output if it happens in a file before session/cookies/header happen. I guess that you could do it by starting the output buffer, dump it, then kill it. But that seems like a bit of a hack.

« previous php.notes (#21583) next »