Myron Turner wrote:
> Jake McHenry wrote:

...

>>
>>
>>   
> I would suggest writing a function in which the parameters are passed in
> as references.  In the function itself have set a variables using the
> heredoc syntax, which incorporates the variables, and then return the
> heredoc variable. Coming from Perl, my impulse is to use a reference for
> the return value, but the manual says not to, that PHP is smart enough
> to know how to optimize itself.  Perhaps someone can tell us whether the
> same is true for the parameters.  The manual is mum on that one.

same is true for the parameters. don't use references unless you need to -
namely when you expect to actually change the passed in value.

> 
> 
> function set_func(&$var1, &$var2 . . . &var17) {
> $return_var = RETURNVAR
> "this is  $var1 and $var2. . . .";
> RETURNVAR ;
> 
> return $return_var;
> 
> }
> 
> _____________________
> Myron Turner
> http://www.room535.org
> http://www.bstatzero.org
> http://www.mturner.org/XML_PullParser/
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to