1 | <?php |
||
5 | class DebugCode |
||
6 | { |
||
7 | /** |
||
8 | * @return bool |
||
9 | */ |
||
10 | public function testVarDumpUnexpected() |
||
16 | |||
17 | /** |
||
18 | * @return bool |
||
19 | */ |
||
20 | public function testVarDumpExpected() |
||
29 | |||
30 | /** |
||
31 | * @return bool |
||
32 | */ |
||
33 | public function testVarDumpWitSimpleComment() |
||
42 | |||
43 | /** |
||
44 | * @return bool |
||
45 | */ |
||
46 | public function testVarExporUnexpected() |
||
52 | |||
53 | /** |
||
54 | * @return bool |
||
55 | */ |
||
56 | public function testVarExporExpected() |
||
65 | |||
66 | /** |
||
67 | * @return bool |
||
68 | */ |
||
69 | public function testVarExporWitSimpleComment() |
||
78 | |||
79 | /** |
||
80 | * @return bool |
||
81 | */ |
||
82 | public function testDebugZvalDumpUnexpected() |
||
88 | |||
89 | /** |
||
90 | * @return bool |
||
91 | */ |
||
92 | public function testDebugZvalDumpExpected() |
||
101 | |||
102 | /** |
||
103 | * @return bool |
||
104 | */ |
||
105 | public function testDebugZvalDumpWitSimpleComment() |
||
114 | } |
||
115 | |||
119 |
The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.
The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.
To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.