Is it best to use double quotes and let PHP expand variables inside strings,
or is it faster to do the string manipulation yourself manually?
Which is quicker?
1)
$insert = 'To Be';
$sentence = "$insert or not $insert. That is the question.";
or
2)
$insert = 'To Be';
$sentence = $insert . ' or not ' . $insert . '. That is the question.';
Small thing, but might as well get it right.
Thanks
/Rune
or is it faster to do the string manipulation yourself manually?
Which is quicker?
1)
$insert = 'To Be';
$sentence = "$insert or not $insert. That is the question.";
or
2)
$insert = 'To Be';
$sentence = $insert . ' or not ' . $insert . '. That is the question.';
Small thing, but might as well get it right.
Thanks
/Rune
Comment