> odd question, but if variables are stored in memory
> until the script terminates, that includes old unused
> variable, isn't it more efficient, memory wise, to
> reuse old variables that reference, in effect the same
> basic data, rather than create new or additional
> variables

The difference would only be measurable if you had a *LOT* of variables...
Like, a whole lot.

Also, PHP *may* (for all I know) have to do more "work" to execute:

$string = substr($string, 0, 10);


$foo = substr($string, 0, 10);

Dunno if it helps or hurts or has no effect for PHP to have to worry about
where the string is going after it does substr, but it *MIGHT*.

At any rate -- The right way to worry about perforance is to figure out
where your code is spending 90% of its time, and to optimize that.  I'm
betting it ain't in variable lookups for most of us :-)

WARNING [EMAIL PROTECTED] address is an endangered species -- Use
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to