Re: $ref =& $this;

From: Date: Mon, 03 Oct 2005 13:39:00 +0000
Subject: Re: $ref =& $this;
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-19339@lists.php.net to get a copy of this message
Derick Rethans wrote:
pointless - I would even go as far as disallowing passing $this by references to a function - where the reference has to be ignored again,
This would be needed to have something like function setfoo(&$obj) { $obj->foo = 42; } [...] $other->setfoo($this); in a way which also works for PHP4. a) I know that you now are going to bash me for mentioning PHP4 b) No, I don't think this is very common or elegant But disallowing it might break existing code, no? - Chris

« previous php.internals (#19339) next »