In this code:
setValue($value); } function setValue($value)
They are passed by value in PHP 4 and by reference in PHP 5. In order to pass objects by reference in PHP 4 you have to explicitly mark them as such:
$obj = &new MyObj;