NYCPHP Meetup

NYPHP.org

[nycphp-talk] Passing Arrays

David Mintz dmintz at davidmintz.org
Tue Oct 28 13:48:42 EST 2003


On Tue, 28 Oct 2003, Robert Redcay wrote:

>
>
> David Mintz wrote:
>
> >Is it not so that PHP -- I'm gonna try to say this intelligibly --
> >doesn't actually copy data that is passed-by-value unless and until you
> >change it inside the function? So pass-by-reference isn't necessary unless
> >it's what you really mean. Stated differently, passing by reference just
> >for the sake of saving memory doesn't save memory. True?
> >
> >
> David,
> This is the impression that I was under as well.
> What I'm worried about is passing objects. Are they not copied until
> they are changed inside the function?


I would imagine so but you ought to ask a guru (-: In any case, if you
want forward-compatibility with PHP 5, you should not count on objects
being passed/assigned by value automatically.


---
David Mintz
http://davidmintz.org/
Email: See http://dmintzweb.com/whitelist.php first!

	"Anybody else got a problem with Webistics?"

		Sopranos 24:17





More information about the talk mailing list