Re: [SMARTY] References

From: Date: Mon, 16 Dec 2002 21:24:58 +0000
Subject: Re: [SMARTY] References
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-6844@lists.php.net to get a copy of this message
On Mon, 2002-12-16 at 15:16, Hinrich Donner wrote: > Hi, > > what will happend? > > $foo = "Hello, World"; > $template =& new Smarty(); > $template->assign_by_ref("foo", $foo); > $template->display("foo.tpl"); > $template->clear_assign("foo"); > echo "$foo"; > > Is $foo still alive? > > Hinrich It should be. Smarty will do an unset() on the assigned template variable. I think if you do an unset() on a reference it doesn't harm the actual contents. -- Monte Ohrt <monte@ispi.net>

« previous php.smarty.general (#6844) next »