主要的差别在于是否将0当作空来看待。 加入var $a = 0; if (empty($a)){ }true,返回空。 empty将$a当作空来处理 if(isset($a)){ }true,返回0 isset将$a当作0来处理