Re: [SMARTY] new plugin: mailto

From: Date: Wed, 22 May 2002 16:45:45 +0000
Subject: Re: [SMARTY] new plugin: mailto
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-4360@lists.php.net to get a copy of this message
On Wed, 22 May 2002, Simon Willison wrote: > I use foreach extensively in my own code because it is convenient, but it > is by no means efficient. As I understand it, it makes a copy of each item > of the array in turn. Also (unrelated to Smarty but important to know) if > you are working with objects it makes a COPY of each object and operates on > that rather than operating on a reference to the original object - this is > bad for performance and can lead to worrying side effects if you are > expecting a method to be called on a specific object rather than a copy of > it. It doesn't really make a copy. It just increments the reference count. But if you try to write to the element, it makes a copy then. -Andrei http://www.gravitonic.com/ "The day Microsoft makes something that doesn't suck, is probably the day Microsoft starts making vacuum cleaners." - Ernst Jan Plugge

« previous php.smarty.general (#4360) next »