RE: [PHP-DEV] Re: Confusing pointers in PHP 4 and 5

From: Date: Wed, 09 Jun 2004 08:22:38 +0000
Subject: RE: [PHP-DEV] Re: Confusing pointers in PHP 4 and 5
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-10335@lists.php.net to get a copy of this message
On Wed, 9 Jun 2004, Stephan Schmidt wrote: > Hi, > > > I think, and I could be completely wrong, that copying a > > variable actually > > creates a reference. The data is only copied when the > > variable referenced is > > modified. > Yes, that is correct. No, it is not. 'copying' a variable copies the structure to contain the variable, but not the data, but does NOT make a reference as that's a different concept. You are right that the data associated with a variable container is only copied when it is modified. Derick

« previous php.internals (#10335) next »