I always use a regular expression for checking for an empty string, dating back to CGI/Perl days, and also with Javascript, so why not with PHP as well, e.g. (albeit untested)
return preg_match('/\S/', $input);
Where \S represents any non-whitespace character