Torsten:
On Wed, Jan 12, 2005 at 04:58:20PM +0100, Torsten Roehr wrote:
> How can I get the name of the extending class that invoked the method in
> drive()?
class Car {
function drive($child) {
echo "parent driven in a $child\n";
}
}
class Porsche extends Car {
function drive() {
parent::drive(get_class());
}
}
Porsche::drive();
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php