Which is better on performance: double quoted strings with variables or single quoted strings with concatenations?

前端 未结 7 1999
暗喜
暗喜 2020-12-11 07:17

I know that using single quotes around a string in PHP is faster than using the double quotes because PHP doesn\'t need to check for variable presence in the single quoted s

7条回答
  •  盖世英雄少女心
    2020-12-11 07:58

    I read an article a while back whereby someone actually tested it.

    The conclusion was that single quotes are more efficient, but as the other two answers point out, the performance difference won't be significant enough to worry about.

提交回复
热议问题