Re: Assign array with __get
| From: | Stanislav Malyshev | Date: | Thu, 25 Mar 2010 23:49:09 +0000 |
| Subject: | Re: Assign array with __get | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-47632@lists.php.net to get a copy of this message | ||
Hi!
So, what's the reasoning behind this design decision? Why is it supposed to work like this and not the other way around?Because when you return something by-value you can not have effects of its modification reflect on the original value. That's how by-value works. When you have by-ref return you can modify it and have the original value change. More here: http://php.net/references -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com