|
Posted by Tony on 06/02/05 01:11
I'm just wondering why it seems most people use "echo" instead of "print". I
tend to use "print", probably because I started programming in BASIC back in
78, so it's just familiar.
Echo can take multiple expressions (as in "echo
$string1,$string2,$string3"), which apparently is a bit faster than multiple
concatenations. But for basic output, there doesn't seem to be a noticeable
difference. The speed test at http://dynacker.dotgeek.org/printvsecho/ shows
a "5%" difference in speed, but this amounts to a negligible difference in
actual execution time on a typical script.
So - why does one choose "echo" over "print", or vice-versa?
[Back to original message]
|