On Mon, Aug 18, 2008 at 01:09:18PM -0400, Kenneth Downs wrote: > David Mintz wrote: > >On Mon, Aug 18, 2008 at 8:51 AM, Kenneth Downs <[EMAIL PROTECTED] > ><mailto:[EMAIL PROTECTED]>> wrote: > > > > function a(&$array, $key,$default='') { > > > >Does using an array reference &$array buy you anything in this instance? > > The basic idea is you don't know how big the array is and you don't want > to pass anything more than you want to.
PHP functions always act on a pointer/reference of the input value UNTIL you write to it. So, in this case, making $array a reference buys you nothing. I don't know if it penalizes you, though. --Dan -- 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 data intensive web and database programming http://www.AnalysisAndSolutions.com/ 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409 _______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php