Re[6]: [SMARTY-DEV] Re[2]: mixing of asign() and assign_by_ref() overwrites external vars
| From: | Dmitry Koteroff | Date: | Sat, 05 Jun 2004 00:26:31 +0000 |
| Subject: | Re[6]: [SMARTY-DEV] Re[2]: 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-2402@lists.php.net to get a copy of this message | ||
B> mea culpa, I take it back. That is the standard behaviour.
B> sigh. I'm still tired of this.
Of course it is the standard behavour. Or else - how this would
work?
call_user_func(array(&$obj, "method")).
If we use & in array(), it does not copy.
=& inside function does not affect to copy behavour - because
before =& formal parameter had been already copied to new
location (from main program to formal parameter). We always work
with copy, EXCEPT the situation we specify "&" explicitly in
function call. I thought it is logical.
--
Best regards,
Dmitry Koteroff.