Re: Classes and parents.
| From: | Dmitry | Date: | Sat, 22 Jan 2005 08:51:33 +0000 |
| Subject: | Re: Classes and parents. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-207035@lists.php.net to get a copy of this message | ||
Thanks,
but I think that this code more easy.
class a {
function say() { echo "A"; }
function run() { $this->say(); }
}
class b {
function say() { echo "B"; }
function run() {
$a = new a;
$a->run();
}
}
$obj = new b;
$obj->run();