1. Home
  2. Docs
  3. PHP Style Guide
  4. Strings

Strings

Always use single quoted strings unless you need variables parsed, and in cases where you do need variables parsed, use braces to prevent greedy token parsing. You may also use double-quoted strings if the string contains single quotes, so you do not have to use escape characters.

INCORRECT:

CORRECT:

Was this article helpful to you? Yes No

How can we help?