[dev] Pass by reference question

Luis Felipe Marzagao/Andamentos lfbm.andamentos at gmail.com
Tue Jan 11 02:23:25 UTC 2011


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?

I would appreciate any pointers.

Thanks!
Luis Felipe


More information about the dev mailing list