By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,717 Members | 1,320 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,717 IT Pros & Developers. It's quick & easy.

Get class name when called statically?

P: n/a
Class Foo {
function Bob {
return NAME_OF_CLASS
}
}
Class Goo Extends Foo {
}

echo Goo::Bob();

What I want to see returned is 'Goo'

__CLASS__ returns 'Foo' and as its being called statically get_class($this)
is empty.

Any ideas?

Rick

Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Rick" <ri**@intelligence-direct.com> wrote in message
news:2s*************@uni-berlin.de...
Class Foo {
function Bob {
return NAME_OF_CLASS
}
}
Class Goo Extends Foo {
}

echo Goo::Bob();

What I want to see returned is 'Goo'

__CLASS__ returns 'Foo' and as its being called statically get_class($this) is empty.

Any ideas?

Rick


Cannot be done. I've tried :-(
Jul 17 '05 #2

P: n/a
Chung Leong wrote:
Cannot be done. I've tried :-(


Bugger :/

Rick

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.