Re: Classes and parents.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux