penders - 8:56 am on Jul 29, 2010 (gmt 0)
Also, declaring the same variable twice is going to cause the script to consume more memory.
Or, assigning one variable to another. Actually, this does not consume as much memory as you might think, if any (although I suspect there will need to be an additional entry in the symbol table?). PHP implements copy-on-write (or lazy copy), so if you assign one variable to another it does not duplicate its contents - until you actually change it.
So, if you simply copy a variable and don't change it, you will not use any more memory.