$obj = new stdClass();
echo gettype($obj); //object
function abc(object $obj) {
return;
}
abc($obj); //Catchable fatal error: Argument 1 passed to abc() must be an instance of object, instance of stdClass given
Why calling abc($obj)
triggers error?
Catchable fatal error: Argument 1 passed to abc() must be an instance of object, instance of stdClass given