note 119507 added to keyword.class
| From: | Anonymous | Date: | Fri, 24 Jun 2016 07:13:25 +0000 |
| Subject: | note 119507 added to keyword.class | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-205804@lists.php.net to get a copy of this message | ||
Get the class name of the class which is initializing another class
<?php
class A {
function foo(){}
}
class B {
function bar(){
$a = new A();
}
}
Now in the above example A is initialized in B, my question is how to get the name of the class in
which it is initialized?
----
Server IP: 72.52.91.14
Probable Submitter: 114.29.250.67
----
Manual Page -- http://php.net/manual/en/keyword.class.php
Edit -- https://master.php.net/note/edit/119507
Del: integrated -- https://master.php.net/note/delete/119507/integrated
Del: useless -- https://master.php.net/note/delete/119507/useless
Del: bad code -- https://master.php.net/note/delete/119507/bad+code
Del: spam -- https://master.php.net/note/delete/119507/spam
Del: non-english -- https://master.php.net/note/delete/119507/non-english
Del: in docs -- https://master.php.net/note/delete/119507/in+docs
Del: other reasons-- https://master.php.net/note/delete/119507
Reject -- https://master.php.net/note/reject/119507
Search -- https://master.php.net/manage/user-notes.php