3 ms·
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('err
by shaunxcode 16y ago
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)));
- there 16y agoah, 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.