note 72289 deleted from keyword.parent by felipe
| From: | felipe@php.net | Date: | Wed, 23 Apr 2008 11:38:18 +0000 |
| Subject: | note 72289 deleted from keyword.parent by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-138688@lists.php.net to get a copy of this message | ||
Note Submitter: riku dot tuominen at benchmarking dot fi
----
But if we are not using extends but instead want to know who instantiated the class.
class A {
foo(){
// aviously this do not work but how would need to be changed
echo parent::foo;
}
class B {
$foo = 'test';
myObject = new A();
myObject.foo();
}