[dev] Pass by reference question
Luis Felipe Marzagao/Andamentos
lfbm.andamentos at gmail.com
Tue Jan 11 11:32:37 UTC 2011
Em 11/01/11 01:20, Chuck Hagenbuch escreveu:
> Quoting Luis Felipe Marzagao/Andamentos <lfbm.andamentos at gmail.com>:
>
>> Hello:
>>
>> I'm trying to learn PHP and also the "horde development style", in
>> order to build a module for my company.
>>
>> Well, maybe this is more of a [beginner] PHP question... anyway, hope
>> anyone can help.
>>
>> Why in the code below the parameters $vars and $tasklist are passed
>> by reference (line31)?
>>
>> https://github.com/horde/horde/blob/master/nag/lib/Forms/DeleteTaskList.php
>>
>>
>> I don't see any of these two variables being changed inside the
>> method, so is there other reason why they should be passed by
>> referece? Is it a performance/memory saving issue?
>
> That's old (PHP 4) style for Horde form. The variables should not, in
> fact, be passed by reference.
>
> -chuck
Great, thanks for clarifying!
Luis Felipe
More information about the dev
mailing list