I did a benchmark of this on a blog I was working on a while ago. However, as I've come to realize there are a lot of variables. Chief among them are:
- How many concatenations are you doing? Each time you do a concatenation PHP re-parses the entire string (or so I've been told). So 1 concatenation may be faster, but 6 may be considerably slower.
- Data type. Though I haven't tested this one myself personally I've been told that the data type being concatenated matters as well, though I'm not sure how much.
Over all I'd say it really isn't that big of a deal for you to actually worry about it. Generally speaking it's only going to make a noticeable difference if you're writing a huge site (think MySpace, Facebook, Flickr, etc) and usually by that point you have so much hardware behind you that the single vs double quotes thing becomes irrelevant again.
Personally I'd say there's far more important things that will impact performance in a much more substantial way (caching, sql optimization, auto loading to prevent unnecessary includes, etc).
I personally choose single quotes nearly every time, but not for speed. I do because I think it's more readable. And that to me is important.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…