> 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
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
I'm building some software that will be passing a string variable which
could potentially be up to 125K bytes (characters) in size.
I know that passing a reference to the variable will be much more efficient
than copying the variable:
copying, as I understand it:
foo($var)
[...later...]