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

From: Date: Tue, 08 Jun 2004 21:42:25 +0000
Subject: Re[2]: [SMARTY-DEV] mixing of asign() and assign_by_ref() overwrites external vars
References: 1 2 3 4  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-2421@lists.php.net to get a copy of this message
>> $b = "xxx"; >> $smarty->assign_by_ref("b", $b); >> $smarty->assign("b", "!"); >> echo $b; >> >> What THEORETICALLY should print last echo statement? "!" or >> "xxx"? Whad documentation says about that (or should say)? Please >> answer. MM> the same semantics as MM> $b = "xxx"; MM> $vb =& $b; /* assign_by_ref */ MM> $vb = '!'; /* assign */ MM> echo $b; MM> so it should print '!'. OK. Short and simple. Let's finish here. -- Best regards, Dmitry Koteroff.

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