[pmwiki-users] Request input on soon-coming FAST Data release

Patrick R. Michaud pmichaud at pobox.com
Wed Oct 4 21:26:20 CDT 2006


On Wed, Oct 04, 2006 at 04:27:02PM -0700, Martin Fick wrote:
> --- "Patrick R. Michaud" <pmichaud at pobox.com> wrote:
> > Fick wrote:
> > > You are trying to find out if when passed
> > > by reference (i.e not copied explictly like this
> > > example does) are they still somehow copied?  
> 
> OK, not quite right, but according to the comments on
> this page:
> http://us3.php.net/manual/en/language.references.php#language.references.whatare
> it is slightly slower to pass by reference (believe it
> or not) which is what I was thinking of originally. 

Okay, works for me.  So PHP does do copy on write for
arrays, which is good to know.  I don't think it affects
much in the PmWiki code, because most places where I'm
using references it's because I want to modify the original
copy, but this is definitely good for me to keep in mind
for the future.

> Of note on this page: 
> http://us3.php.net/manual/en/language.references.pass.php
> call-time pass by reference is deprecated!

"Call-time pass by reference" refers to the case where
the program explicitly uses a reference on an argument,
as in:

    foo(&$a);

PmWiki doesn't do this in any of its code.

Thanks for the excellent research, it's a big help.

Pm




More information about the pmwiki-users mailing list