hello,
The following script works, but there is a problem that I try to understand.
class foo{
var $member = 999;
function foo(){
global $ref;
$ref [] = &$this;
}
}
I want to work with the original copy of the object. I know you can write $obj = &new foo. But we can't define a simple variable $ref = &$this, we must we use an array $ref[].
When I used the simple variable $ref instead of $ref[], it didn't display anything:
class foo{
...
$ref = &$this;
...
}
$x=new foo;
echo $ref->member;
Thanks in advance