[prev in list] [next in list] [prev in thread] [next in thread] 

List:       smarty-dev
Subject:    Re[2]: [SMARTY-DEV] mixing of asign() and assign_by_ref() overwrites external vars
From:       213.248.61.33
Date:       2004-06-08 21:42:25
Message-ID: 1910213072.20040609014225 () koteroff ! ru
[Download RAW message or body]

>> $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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic