note 24323 added to function.get-class
| From: | oliver@php.net | Date: | Tue, 13 Aug 2002 11:19:15 +0000 |
| Subject: | note 24323 added to function.get-class | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-34923@lists.php.net to get a copy of this message | ||
Take this as an example for this function:
class Foo{
function Foo(){}
function whoami() {
echo get_class( $this );
}
}
class Bar extends Foo {
function Bar(){}
}
$baz = new Bar();
$baz->whoami();
This will output:
bar
--
http://www.php.net/manual/en/function.get-class.php
http://master.php.net/manage/user-notes.php?action=edit+24323
http://master.php.net/manage/user-notes.php?action=delete+24323
http://master.php.net/manage/user-notes.php?action=reject+24323