String manipulation, optimize



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


.



Relevant Pages

  • Filepath string manipulation help
    ... I'm trying to use some string manipulation from a file's path. ... I need to extract everthing after the last '\' and save it. ... I'm guessing '\' is set aside for switches. ... Prev by Date: ...
    (comp.lang.python)
  • Re: Best Way to Create String Variables in Assembly
    ... I am coding on BSD. ... I can figure out the string manipulation out once I ... Prev by Date: ...
    (alt.lang.asm)