Bad Code

Bad Code

Posted by admin on October 8, 2009 at 12:19 pm

Further to my last post about the quality of code in certain well known PHP projects, I just stumbled across this fantastically pointless finger spew.

function the_title($before = ”, $after = ”, $echo = true) {
$title = get_the_title();
if ( strlen($title) == 0 )
return;
$title = $before . $title . $after;
if ( $echo )
echo $title;
else
return $title;
}
How entirely pointless [...]