Updated String concatenation (markdown)

LogMANOriginal 2018-11-05 13:16:20 +01:00
parent cf1a84a0a6
commit 3d49fb0217

@ -1,3 +1,25 @@
PHP supports both single quote strings and double quote strings. For pure text you must use single quote strings for consistency. Double quote strings are only allowed for special characters (i.e. `"\n"`) or inlined variables (i.e. `"My name is {$name}"`);
<details><summary>Example</summary><div><br>
**Bad**
```PHP
echo "Hello World!";
```
**Good**
```PHP
echo 'Hello World!';
```
</div></details><br>
_Reference_: [`Squiz.Strings.DoubleQuoteUsage`](https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php)
***
The concatenation operator should have one space on both sides in order to improve readability. The concatenation operator should have one space on both sides in order to improve readability.
<details><summary>Example</summary><div><br> <details><summary>Example</summary><div><br>