Re: Package proposal: Mail_Mime (alternative)
| From: | Heino H. Gehlsen | Date: | Fri, 15 Aug 2003 16:32:32 +0000 |
| Subject: | Re: Package proposal: Mail_Mime (alternative) | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-19830@lists.php.net to get a copy of this message | ||
> > > Pass by reference is slower in PHP4. PHP4 has reference counting
> > > which prevent copies from being made if the variable is not actually
> > > modified.
>
> the point is that in the second line you don't actually make a copy yet.
> Only once you change the value a new var is really created
>
> the same applies to passing values to a function.
> Because if this mechanism pass by reference is actually slower than not
> using it. Therefore pass by reference should only be used if you really
> need it.
Does the manual contain this information? If so, it must be well hidden...
But if one know for sure, that the variable one passes to a function is
modified or if the variable contains whole email with attachments (60KB) is
it not faster to parse by reference than by value?
If so, how large must a variables be before one actually gains an advantage?