tedd a écrit :
The cycle of programming continues.
And the algorithm era crunch down ;) The test isn't accurate because it focuses on two strings of the same length. And all programmers know that some algorithms depends on the size of the data handled, and the number of it.
Obviously, parameters method of echo must be faster than concatenation method. If it isn't, we are in the window that is better, or they are a problem, or an optimization ;) The reason is PHP make an allocation of a new string when concat that equal to the size of the two strings, and copy strings content into the new allocate memory zone. So if you just echo, it allocates the memory just needed to copy in the echoed string.
So said, benchmarks must be make with a good knoledge of what you're handling, although you can't do a good one. For example, I can't make a benchmark on english as you can see ;)
-- Mickaël Wolff aka Lupus Michaelis http://lupusmic.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php