Remove side-effects

PSR-1 says

A file SHOULD declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it SHOULD execute logic with side effects, but SHOULD NOT do both.

We have class files and files full of functions with side-effects It would be the first step towards class autoloading.

Read-only archive:

Author: Viktor Szépe

Vote count: 5

Status: open


Since this is part of coding standards, we have another completed petition specifically for coding standards. This petition seems to be a duplicate as it only focuses on one specific part of PSR-1. Unless there are objections, this duplicate petition will be closed.

1 Like

This topic was automatically closed after 3 days. New replies are no longer allowed.