tosbourn/Useful-PHP-Functions — Issue #3: Suggestion
Author: adael
Created: 2011-11-09 12:15:50+00:00
State: open

I guess a better name could be:

/**
* Returns $alternative if $value is empty
* @param mixed $value
* @param mixed $alternative
* @return mixed
*/
function ifEmpty($value, $alternative = ''){
return empty($value) ? $alternative : $value;
}