Possible Duplicate:
PHP String concatenation – “$a $b” vs $a . “ ” . $b – performance
<?php
$url = 'http://www.google.com/';
//case 1
$case1 = 'The URL is '.$url.'.';
//case 2
$case2 = "The URL is $url.";
//case 3
$case3 = 'The URL is {url}.';
$case3 = str_replace('{url}', $url, $case3);
?>
Thank you!
case 1 and 2 are basically the same (don’t worry about your 2 nanoseconds lost) – i think there are questions on SO covering this issue. case 3 is probably slower due to string search and replacement. if you really want to know, profile all three cases.