Possible Duplicate:
What is the best way to add two strings together?
Ignoring the data formatting benefits, which of these is the quickest? Or less memory hungry?
I expect the difference to be negligible.
$answer = "A String: {$string}";
$answer = sprintf('A String: %s', $string);
PS: I read a blog that discovered echo $a, $b
was slightly faster than echo $a . $b
(comma vs concatenate) because the latter creates a third value temporarily before echoing it.