|
8 | 8 |
|
9 | 9 | * Use of Perl/shell style comments (`#`) is discouraged. |
10 | 10 |
|
11 | | -```php |
12 | | -// Encouraged Comment |
13 | | -/* Encouraged Comment */ |
| 11 | +```php |
| 12 | +// Encouraged Comment |
| 13 | +/* Encouraged Comment */ |
14 | 14 |
|
15 | | -# Discouraged Comment |
16 | | -//Discouraged Comment |
17 | | -/*Discouraged Comment*/ |
18 | | -``` |
| 15 | +# Discouraged Comment |
| 16 | +//Discouraged Comment |
| 17 | +/*Discouraged Comment*/ |
| 18 | +``` |
19 | 19 |
|
20 | 20 | * If you are making a longer, multi-line comment, use line breaks instead of spaces immediately inside both ends of a `/* */`-style comment. |
21 | 21 |
|
22 | | -```php |
23 | | -/* |
24 | | - * This is an extra long comment that I'm breaking up |
25 | | - * into multiple lines for improved readability. |
26 | | - */ |
27 | | -``` |
| 22 | +```php |
| 23 | +/* |
| 24 | + * This is an extra long comment that I'm breaking up |
| 25 | + * into multiple lines for improved readability. |
| 26 | + */ |
| 27 | +``` |
28 | 28 |
|
29 | 29 | * There should always be one line of whitespace above the start of a comment block. |
30 | 30 |
|
31 | | -```php |
32 | | -// This is my code. |
33 | | -echo 'This is my code.'; |
| 31 | +```php |
| 32 | +// This is my code. |
| 33 | +echo 'This is my code.'; |
34 | 34 |
|
35 | | -// This is more code. |
36 | | -echo 'This is more code.'; |
| 35 | +// This is more code. |
| 36 | +echo 'This is more code.'; |
37 | 37 |
|
38 | | -if (condition) { |
| 38 | +if (condition) { |
39 | 39 |
|
40 | | - // comment |
41 | | - echo 'code'; |
42 | | -} |
43 | | -``` |
| 40 | + // comment |
| 41 | + echo 'code'; |
| 42 | +} |
| 43 | +``` |
0 commit comments