I am passing $row which has been assigned $statement->fetchAll(); to it I am passing it to another class and I want to check if it’s an stdClass Object within the method, for example if I wanted to check if it was an array I would do
public function hello(array $row)
how would I do it to check if it was a stdClass Object ?
Finally is this called type hinting ?
Well solution look like easy one.
public function hello(stdClass $row)I checked with php version 5.3 it works. like passing a stdclass object works but all other types gave cacheable fatal error.