Re: [PHP] Parsing database variables
- From: jochem@xxxxxxxxxxxxx (Jochem Maas)
- Date: Sat, 31 Mar 2007 17:56:00 +0200
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/
- References:
- RE: [PHP] Parsing database variables
- From: "Jake McHenry"
- Re: [PHP] Parsing database variables
- From: Myron Turner
- RE: [PHP] Parsing database variables
- Prev by Date: programs taking too long to exit
- Next by Date: Re: <? vs <?php - bizzare problem
- Previous by thread: Re: [PHP] Parsing database variables
- Next by thread: RE: [PHP] Parsing database variables
- Index(es):