i want to call function store inside array but before i do it i want to check if it is function,string or any other type.
please take a look at my code
$a=new stdClass();
$array = array(function() {
return "Bhavik Patel";
}, "1213",$a);
foreach ($array as $key => $value) {
if (is_object($value)) {
echo $value() . "<br/>";
} else {
echo $value . "<br/>";
}
}
by doing this i can check if value is object then i call it but if i pass object it gives (pf course this will give error)
my intention is to find if value is function then call it.