php - is there a function that return false on 0 or other things but true on false,null, empty array()? -
i think simplest way (!$var , $var!=0), there way without repeating var name?
function foo($var) { return ($var === false || $var === null || is_array($var)); } if(foo($your_var)){}
Comments
Post a Comment