Re: Re: $ref =& $this;

From: Date: Mon, 03 Oct 2005 13:40:41 +0000
Subject: Re: Re: $ref =& $this;
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-19340@lists.php.net to get a copy of this message
Hello Christian, php 4 code is wrong in this and we don't want to support the errors forever. marcus Monday, October 3, 2005, 3:39:00 PM, you wrote: > 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 Best regards, Marcus

« previous php.internals (#19340) next »