Reply to Re: [PHP] Re: Strange notation to create object

Your name:

Reply:


Posted by Evert | Rooftop Solutions on 10/21/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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация