You are here: Re: Passing by Reference « PHP Programming Language « IT news, forums, messages
Re: Passing by Reference

Posted by Sanders Kaufman on 09/11/07 13:39

gosha bine wrote:
> On 11.09.2007 15:02 Sanders Kaufman wrote:
>> gosha bine wrote:
>>> On 11.09.2007 14:20 Sanders Kaufman wrote:
>>
>>> In php4 you should prepend & to any variable or a function parameter
>>> containing or refering to an object. Examples include:
>>
>> "Containing or referring, eh?
>> So - I should put the byref "&" thing in BOTH the function call AND
>> the function defintion?
>
> no, only in the declaration
>
>> Like thus:
>> function fnClassify(&$oClass){
>> $oClass->a = 1;
>> return true;
>> }
>
> correct
>
>> ... and so:
>> $bSuccess = fnClassify(&$oMyClass);
>>
>
> incorrect
>
>>
>>> Again, all this is needed only for php4. I can't think of a good
>>> reason to use it.
>>
>> That's where I'm at with this thing - 4.
>
> good luck ;)

T'worked. Thanks. Gimme the name of a charity and maybe I'll Paypal
'em a few bucks.

 

Navigation:

[Reply to this 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

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