How do I pass a reference to an object constructor, and allow that object to update that reference?
class A{
private $data;
function __construct(&
You'll have to tell PHP to assign a reference also to the private member data
like this:
$this->data = &$d;
Depending on the context, you may not want to use references to external arrays, and it might be better to have that array inside an object that handles it.
Aslo notice that the constructor is called __construct
not __construction
.