Posted by Tamagafk on 02/01/07 14:55
Hi there,
I heard storing reference to THIS from inside object's constructor can
cause problems:
$myObjects = array();
class MyClass{
function MyClass(){
global $myObjects;
$myObjects[] = $this;
}
}
Do you know anything about that? It looks like when constructor
finishes all such references lead to COPY of the object.
Navigation:
[Reply to this message]
|