RE: [PHP-DEV] __set and reference
| From: | Dmitry Stogov | Date: | Mon, 12 Dec 2005 07:50:04 +0000 |
| Subject: | RE: [PHP-DEV] __set and reference | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-21185@lists.php.net to get a copy of this message | ||
Assign by reference is not possible with __set() method.
Thanks. Dmitry.
> -----Original Message-----
> From: Superbiji [mailto:superbiji@gmail.com]
> Sent: Monday, December 12, 2005 6:49 AM
> To: internals@lists.php.net
> Subject: [PHP-DEV] __set and reference
>
>
> Hi All,
>
> in prior 5.1, it is allowed to do:
> class MyClass {
> public function __set($key, &$value) {}
> }
> $c = new MyClass();
> $c->d=10;
>
> in 5.1 up:
> that code result this:
> Fatal error: Couldn't execute method MyClass::__set in
> Unknown on line 0
>
> I have submit this bug.
> My question is, is it possible to assign as reference using
> setter method ?
>
>
> --
> kamus online - http://kamus.landak.com/
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>