Re[2]: mixing of asign() and assign_by_ref() overwrites external vars
Dmitry Koteroff <[email protected]>
| Newsgroups | gmane.comp.php.smarty.devel |
|---|---|
| Message-ID | <[email protected]> |
>> $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.
--
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php