Re: Assign array with __get
I guess you're gonna hate this :)
So what you're saying is that it is *consistent* with regard to the
implementation of methods/functions, i.e. __get behaves as an
ordinary method.
On Fri, Mar 26, 2010 at 1:49 AM, Stanislav Malyshev <stas@zend.com> wrote:
> 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
>
--
Ionut G. Stan
I'm under construction | http://blog.igstan.ro/
Thread (25 messages)