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]
|