|
Posted by Evert | Rooftop Solutions on 09/28/01 11:19
Robert Cummings wrote:
>On Thu, 2005-06-23 at 13:36, Matthew Weier O'Phinney wrote:
>
>
>>* Robert Cummings <robert@interjinn.com> :
>>
>>
>>>On Thu, 2005-06-23 at 11:32, Matthew Weier O'Phinney wrote:
>>>
>>>
>>>>The above notation is unnecessary when developing in PHP5, as objects in
>>>>PHP5 are passed by reference by default. However, in PHP4, this was
>>>>
>>>>
>>>Not entirely, there's still a subtle difference in PHP5 between
>>>assigning an object with = versus assigning with = &.
>>>
>>>
>>Would you mind explaining the difference? I've seen nothing in the docs,
>>to indicate that assigning objects with =& in PHP5 is necessary, or even
>>desired. My experience with PHP5 hasn't shown this either. I'd be
>>interested to know to what you refer.
>>
>>
>
>See for yourself when running the following script:
>
>Cheers,
>Rob.
>
>
I am stunned! Since I try to make my code working for both PHP4 and PHP5
I try to never rely on PHP4's standard cloning behaviour, and use &
where I can, so I have never really encountered this, but this will
propably save my a lot of frustration when the rest of the world says
goodbye to PHP4. (I remember when I first encountered the 'references in
constructor'-issue)
excellent stuff!
grt,
Evert
Navigation:
[Reply to this message]
|