RE: [PHP-DB] Passing by reference

2002-11-18 Thread Hutchins, Richard
> From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] > Sent: Sunday, November 17, 2002 12:21 AM > To: Peter Beckman > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] Passing by reference > > > PHP uses copy-on-write for by-value passes. So, if you are > not changing > t

Re: [PHP-DB] Passing by reference

2002-11-16 Thread Rasmus Lerdorf
PHP uses copy-on-write for by-value passes. So, if you are not changing the passed string inside the function there is no copy done on a pass-by-value and this is actually faster than doing a pass-by-reference. But, I'd suggest doing ".$myvar." (ie. break out of the quoted string and concat the v