PHP Speed - Many Echos vs Building a String
Posted
by Chris
on Stack Overflow
See other posts from Stack Overflow
or by Chris
Published on 2010-06-05T21:10:33Z
Indexed on
2010/06/05
21:12 UTC
Read the original article
Hit count: 168
Wondering if anyone knows if either of these methods would produce an output faster:
Method 1
for ($i=1;$i<99999;$i++) {
echo $i, '<br>';
}
or
Method 2
for ($i=1;$i<99999;$i++) {
$string .= $i . '<br>';
}
echo $string;
Thanks for any input you have.
© Stack Overflow or respective owner