Re: [SMARTY-DEV] Re: [SMARTY]Re:[SMARTY-DEV]$smarty.session.object doesn't work in 2.5.0

From: Date: Tue, 15 Apr 2003 20:43:44 +0000
Subject: Re: [SMARTY-DEV] Re: [SMARTY]Re:[SMARTY-DEV]$smarty.session.object doesn't work in 2.5.0
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1171@lists.php.net to get a copy of this message
> reference-counting is used internally by php for garbage-collection, > AFAIK, but not visible to the application-programmer. but any > assignment implies a copy of the data. no, right THAT is NOT done... > try sth. like this: > > 1: $a = array('a'); > 2: $b = $a; > 3: $a[] = 'b'; > > > if a reference was assigned in line 2, then $b would be "array('a', > 'b')" > since it references the same entity as $a. but since a copy is done in line > 2, $a is changed in line 3, but $b is not. in line 2, $b is a reference to the value of $a ($a is a reference to the value of $a, too) a copy of $b is created in line 3 ($b is old $a), and $a gets changed (additional row, key "1", value "b") Regards ;)))) David

« previous php.smarty.dev (#1171) next »