NYCPHP Meetup

NYPHP.org

[nycphp-talk] Passing Arrays

Analysis & Solutions danielc at analysisandsolutions.com
Tue Oct 28 09:50:26 EST 2003


Hi Jim:

On Mon, Oct 27, 2003 at 05:53:56PM -0500, Jim Smith wrote:
> With PERL, if passing two arrays to a subroutine the arrays should be
> passed as references to ensure their integrity.
> 
> Should this also be applied with PHP?

Just curious, are you delcaring the function with arguments, or are you
grabbing them via func_get_args()?

Either way, I don't believe you HAVE to.

Are you changing data in either of those arrays inside the function?  If 
so, then passing by reference is more efficient.

Lata,

--Dan

-- 
     FREE scripts that make web and database programming easier
           http://www.analysisandsolutions.com/software/
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7th Ave #4AJ, Brooklyn NY    v: 718-854-0335   f: 718-854-0409



More information about the talk mailing list