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> The whole point of assigning-by-reference is that you are B> aliasing the variable as opposed to making a copy. When you B> assign $test_2 = $test, even though you don't do it B> by-reference, you are making a copy of an object that contains B> references. When you alter the reference (even in the copy), B> you necessarily alter the original var. This is the way PHP B> works and I don't think it implies any problems with the B> Smarty semantics. I still don't understand why don't you want to appli little patch which was attached above. It is fully transparent, back-compatible and add new feautures (including fix of unsuspected behavour with assign after assign_by_ref). -- Best regards, Dmitry Koteroff. -- Smarty Development Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php