PSR-1 states:
Files SHOULD either declare symbols (classes, functions, constants, etc.) or cause side-effects (e.g. generate output, change .ini settings, etc.) but SHOULD NOT do both.
Let's suppose we have following code:
// db.php file
class Db{
// Some code here
}
$DB = new Db();
Does instantiating an object count as causing a side effect? In other words, is the above code PSR-1 compliant?