It’s been a while since I exhibited anything, but I’ve got three new pieces and one old one in the summer show at the Redearth gallery (currently without a decent website unfortunately)
Month: June 2011
Quick debug function
It’s not pretty and it’s not elegant, but we’ve all got a bag of quick and dirty functions that help make life just a little bit easier.
This is a simple print_r()
but I finally got fed up of loosing my quick debug statements and so added the line name and file number from a stack trace (substitute var_export() to taste).
function pr($str){
echo('');
print_r($str);
echo('
');
$d = debug_backtrace();
echo $d[0]['file'] . '
Line: ' . $d[0]['line'] . '';
echo '
';
}