Jochem Maas wrote:
Dmitry wrote:
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();
for starters b doesn't even extend a
and secondly the
Dmitry wrote:
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();
for starters b doesn't even extend a
and secondly the b::run() method is c
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();
--
PHP General Mailing List (http://www.php.net/)
3 matches
Mail list logo