版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/ufan94/article/details/81286466
public static function checkEmpty($value) {
if(!isset($value))
return true ;
if($value === null )
return true;
if(is_array($value) && count($value) == 0)
return true;
if(is_string($value) &&trim($value) === "")
return true;
return false;
}
is_numeric — 检测变量是否为数字或数字字符串