You can check if an object is an instance of a class with instanceof
, e.g.
if($role instanceof SimpleXMLElement) {
//do stuff
}
You can check if an object is an instance of a class with instanceof
, e.g.
if($role instanceof SimpleXMLElement) {
//do stuff
}