I want to test if an object is null or not, I have the follwing code
$listcontact = array();
$contact=$ms->search('email','test@live.Fr');
var_dump(($contact));
and the result if $listcontact
not null is give as follow
object(stdClass)[6]
public 'item' => string 'dfdfsd' (length=7)
in the case it's null , I get the following result
object(stdClass)[6]
How I can test the variable $listcontact
exists or not? I've tried with is_null
and (empty()
but not work