Re: ext/overload API
| From: | Timm Friebe | Date: | Thu, 14 Nov 2002 13:46:06 +0000 |
| Subject: | Re: ext/overload API | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-91033@lists.php.net to get a copy of this message | ||
On Thu, 2002-11-14 at 14:09, Timm Friebe wrote:
> Hello,
[...]
> function __get($k) {
> return $this->$k;
> }
[...]
Woops, this is wrong, of course.
function __get($k, &$v) {
$v= &$this->$k;
return TRUE;
}
I also missed that if a member variable exists, __get or __set won't be
called. I think this'd be quite useful though...
--
Timm
Any sufficiently advanced bug is indistinguishable from a feature