Gotta go with Crimaniak on this one... There is no difference between:
$str="Test ";
// processing whatever
// $var is now created
$str .= $var;
AND
// processing whatever
// $var is now created
$str = "Test ".$var;
//or
$str = 'Test $var';
Because in your example, there is no other variable defined but $var, and it doesn't matter where $str is defined, so long as it's after the $var is defined...
If you had more than one variable, then I believe lazzerous' example would be more along the lines of what you are looking for. (but you could still make crimaniak's option work better). I mean, if all you are going to do is echo the $str, then why define any of the $str variable until all of the associated variables within have been defined?