note 75661 rejected from language.oop5 by nlopess
| From: | nlopess@php.net | Date: | Tue, 19 Jun 2007 12:30:20 +0000 |
| Subject: | note 75661 rejected from language.oop5 by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-127785@lists.php.net to get a copy of this message | ||
Note Submitter: jfkallen at hotmail dot com
----
This is a simple problem but I cant figure this out in PHP.
In C++ you can have two seperate classes each of which uses the other as a member. This is done by
declaring the first class without defining it before defining the second class.
//...in C++
class A;
class B{
//stuff
private:
A m_a;
};
class A{
//stuff
private:
B m_b;
}
Does anyone know if there is a way to achieve this result in PHP?
Thanks.