Reply to Re: =& when creating new object

Your name:

Reply:


Posted by Steve on 09/24/07 20:31

"Michael Fesser" <netizen@gmx.de> wrote in message
news:d57gf3p144kqni8fvaan5kra2f2d9vntbj@4ax.com...
> .oO(Joe)
>
>>I am just starting to use Object Oriented PHP coding, and I am seeing
>>quite often the following (this example taken from a wiki):
>>
>>$wakka =& new Wakka($wakkaConfig);
>
> It was required in PHP 4 to make sure that $wakka will be assigned a
> reference to the created object instead of just a copy of it, which
> could lead to problems in some situations.
>
> If you just start with OOP in PHP, then you should do this with PHP 5,
> where objects are always passed as references by default and you don't
> have to worry about this issue anymore (at least not for objects).

you've implied that byVal and byRef are restricted only to php versions and
applied only to objects. i'm sure that's not the message you want to get
across here, right?

[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

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