Using this snippet of code as an example, could the die () function override the return and exit? Can it have same return operation?
public function error()
{
if(!$this->connection || !$this->statement) {
return (object) array(
'exception' => $this->connection->errno,
'error' => $this->connection->error
);
exit;
}
}