3 ms·
If I were writing a PHP parser, then I would convert double-quoted strings of the form "foo $bar baz" to 'foo '.$bar.' baz' when the script is first parsed. So
by codeka 14y ago
If I were writing a PHP parser, then I would convert double-quoted strings of the form "foo $bar baz" to 'foo '.$bar.' baz' when the script is first parsed. So executing the string concatenation in a loop would have no performance difference, because the string is only parsed the first time.
That's just a guess, though, having not actually looked at the code myself.