Re: mixing of asign() and assign_by_ref() overwrites external vars
messju mohr <[email protected]>
| Newsgroups | gmane.comp.php.smarty.devel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Jun 08, 2004 at 10:12:02PM +0400, Dmitry Koteroff wrote:
[...]
> $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.
the same semantics as
$b = "xxx";
$vb =& $b; /* assign_by_ref */
$vb = '!'; /* assign */
echo $b;
so it should print '!'.
[...]
--
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php