News for hackers. Stuff that matters.
Re:A Built-in Web Server For PHP by shaunxcode on Wednesday March 02, 2011 @09:50PM (#2282527)
Hey, rather than using ob_start and ob_get_clean you can do:

  $lines = explode("\n", print_r($obj,1));
Or better yet if we're playing golf:

  array_map('error_log', explode("\n", print_r($obj, 1)));
Re:A Built-in Web Server For PHP by there on Wednesday March 02, 2011 @09:52PM (#2282538)
ah, i must have written that a very long time ago when the return parameter to print_r() wasn't available.

thanks, i've updated my local implementation.