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

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -