> I'm not sure if this will work, but hey, you could give it a try.
>
> class Car
> {
>public static $className = __CLASS__;
>
>public static function drive ()
>{
> return self::$className;
>}
> }
>
> class Porsche extends Car
> {
>public static $className = __CLASS__;
> }
Torsten Roehr wrote:
"Christopher Fulton" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Not sure if this is the best way to do it or not, but you can do this
and it should (untested code) work.
class Car {
function drive() {
return $this->getClassName();
"Christopher Fulton" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Not sure if this is the best way to do it or not, but you can do this
> and it should (untested code) work.
>
> class Car {
> function drive() {
> return $this->getClassName();
> }
>
Not sure if this is the best way to do it or not, but you can do this
and it should (untested code) work.
class Car {
function drive() {
return $this->getClassName();
}
function getClassName() {
return "Car";
}
}
class Porshe {
4 matches
Mail list logo