Bear with me cos I'm new to oop!
Is it possible to assign the result of a function to an attribute?
This probably doesn't make sense so here's what I think the code might look like!
Class b extends a
{
public $conn= $this->connect();
public function operation() { ...}
}
connect()
is a function from class a that connects to a database and returns $result
if successful.