note 73614 added to keyword.parent
| From: | joan at hotmail dot com | Date: | Sat, 03 Mar 2007 18:59:38 +0000 |
| Subject: | note 73614 added to keyword.parent | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-124047@lists.php.net to get a copy of this message | ||
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();
}
----
Server IP: 69.147.83.197
Probable Submitter: 84.36.108.16
----
Manual Page -- http://www.php.net/manual/en/keyword.parent.php
Edit -- https://master.php.net/note/edit/73614
Del: integrated -- https://master.php.net/note/delete/73614/integrated
Del: useless -- https://master.php.net/note/delete/73614/useless
Del: bad code -- https://master.php.net/note/delete/73614/bad+code
Del: spam -- https://master.php.net/note/delete/73614/spam
Del: non-english -- https://master.php.net/note/delete/73614/non-english
Del: in docs -- https://master.php.net/note/delete/73614/in+docs
Del: other reasons-- https://master.php.net/note/delete/73614
Reject -- https://master.php.net/note/reject/73614
Search -- https://master.php.net/manage/user-notes.php