Would you initialize your strings with single quotes or double quotes?

  1. Since the data inside the single-quoted string is not parsed for variable substitution, it’s always a better idea speed-wise to initialize a string with single quotes, unless you specifically need variable substitution
  2. Single quotes will print the statement as a literal but double quotes prints the value for the variables also.
  3. Single quotes for performance, no matter if there are variables or not!
Posted in PHP | Tagged , , | Comments Off

Comments are closed.