Re: [SMARTY-DEV] mixing of asign() and assign_by_ref() overwrites external vars

From: Date: Tue, 08 Jun 2004 06:41:12 +0000
Subject: Re: [SMARTY-DEV] mixing of asign() and assign_by_ref() overwrites external vars
References: 1 2  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2414@lists.php.net to get a copy of this message
Boots schrieb:
--- Sebastian Mendel <lists@sebastianmendel.de> wrote:
Boots schrieb:
[...] It doesn't solve the problem: the original poster was mis-using the feature.
:-( i dont think so!
[..snip..]
$myvar = true; var_dump($myvar); echo '<br />';
$test = new Smarty; $test->assign_by_ref('myvar', $myvar); $test_2 = $test; $test_2->assign('myvar', false); var_dump($myvar); echo '<br />';
I'm suggesting that you don't really want to use assign_by_ref.
i want! cause i asign an object, and later do changes in the object before rendering the output! the point is not that i dont understand what happens, that is absolutely clear to me! the point is just that it is confusing and not the way i expected it will work! but as i said before, i have no problem with this behaviour, now that im aware of it, i just would point it out. -- Sebastian Mendel www.sebastianmendel.de www.warzonez.de www.tekkno4u.de www.nofetish.com www.sf.net/projects/phpdatetime www.sf.net/projects/phptimesheet

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