note 10718 added to print_r

From: Date: Thu, 18 Jan 2001 20:16:21 +0000
Subject: note 10718 added to print_r
Groups: php.notes 
Request: Send a blank email to php-notes+get-9938@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. http://www.php.net/manual/en/function.print-r.php

« previous php.notes (#9938) next »