我需要检查传递的变量是否为字符串类型,并且不为空。我有以下功能:functionisNonEmptyStr($var){if(isset($var)){if(is_string($var)){if(strlen($var)>0){returntrue;}}}returnfalse;}我期望的结果:echo(isNonEmptyStr(''));//falseecho(isNonEmptyStr(''));//trueecho(isNonEmptyStr('a'));//trueecho(isNonEmptyStr('1'));//trueecho(isNonEmptyStr(1));/