I'm trying to organize classes in a project in a fashion similar to:
$TheRoberts = new family;
class family {
public function __construct() {
$bobby = new father;
$cindy = new daughter;
}
}
class father extends family {
function PayBills() {}
function GoToWork() {}
}
class daughter extends family {
function AskForMoney() {}
function GoToSchool() {}
}
Literature on the subject is pretty abstract, but, if I understand correctly, this is how it's done. Why, then, is PHP throwing errors about memory exhaustion and exceeding execution times? In short: why is the constructor looping?