Works for me:
<?php
class X
{
public $content;
}
class Y
{
private $currentcontent = 'test';
function foo()
{
$output = new X();
echo $this->currentcontent;
$output->content=$this->currentcontent;
echo $output->content;
}
}
$y = new Y();
$y->foo();
?>
I get the output "testtest".
In other words, provide the smallest and simplest (runnable) script that demonstrates the problem.