4 ms·
> Descriptive function names never lie Beg pardon[0]? function _utf8Encode(&$arr){ for($i=0;$i<(count($arr['parameters']));$i++){ $arr['pa
by masklinn 13y ago
> Descriptive function names never lie
Beg pardon[0]?
function _utf8Encode(&$arr){
for($i=0;$i<(count($arr['parameters']));$i++){
$arr['parameters'][$i]= $arr['parameters'][$i];
}
}
function _utf8Decode(&$arr){
for($i=0;$i<count($arr['parameters']);$i++){
$arr['parameters'][$i]= $arr['parameters'][$i];
}
}
Or[1]
public static string ReturnEmptyStringIfNullElseValue(string value) {
if (value == null) {
return "";
} else {
return value.ToString().Trim();
}
}
[0] http://thedailywtf.com/Comments/There-and-Back-Again.aspx http://thedailywtf.com/Comments/There-and-Back-Again.aspx
[1] http://thedailywtf.com/Articles/Common-Functions,-not-Common-Sense.aspx http://thedailywtf.com/Articles/Common-Functions,-not-Common...
- jeremiep 13y agoI stand corrected. Thank god I never have to deal with such code!