Archive for October, 2009

Bad Code

October 8, 2009

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 [...]

Posted in Bad Code, Opinions 2 Comments »