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

From: Date: Wed, 16 Apr 2003 20:25:22 +0000
Subject: Re: [SMARTY-DEV] Re: [SMARTY]Re:[SMARTY-DEV]$smarty.session.object doesn't work in 2.5.0
Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1205@lists.php.net to get a copy of this message
> $bar = 'blah'; > $foo = $bar; <-- REFERENCE > $smarty->assign('foo', $bar); <-- REFERENCE > > $bar = array('blah','blah2'); > $foo = $bar; <-- REFERENCE > $smarty->assign('foo', $bar); <-- COPY No, these are exactly the same. Part of the confusion comes with the terminology. A "reference" is a value (zval internally) with is_ref field set to 1. This means that all the variables that have this value will change all together if the value is changed. If is_ref is 1, but refcount > 1 (meaning, more than one variable uses this value), then it is not a reference. -Andrei http://www.gravitonic.com/ That just adds to the confusion - they're references but they're not? MM --------------------------------- Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo.

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