A function wrote by a co-worker:
function test($what, $where) {
if (!empty($where)) {
if (!empty($where[$what])) {
return $where[$what];
} else {
return '';
}
} else {
return '';
}
}
When I had a look at this function I immediatlly tought: Test? What does it test? Thankfully there’s the $what argument! And look! A $where argument too!
WTF? Folks, name your functions and variables properly.
Leave a Reply
You must be logged in to post a comment.