Posted by NoWhereMan on 05/14/07 18:27
Maybe a stupid question.
-------------------------
1
-------------------------
$str = '';
for($i=0; $i<10; $i++)
$str .= $i;
echo $str;
-------------------------
2
-------------------------
$str = array();
for($i=0; $i<10; $i++)
$str[]= $i;
echo implode('', $str);
-------------------------
I suppose the latter will be more performant because there's less work for
the garbage collector, am I right?
thanks
--
NoWhereMan (e.v.)
-- http://www.nowhereland.it
-- http://flatpress.nowhereland.it
[Back to original message]
|