ClassicPress PetitionsClassicPress Petitions
This is a read-only archive. Post or comment on the live version of this page on our forums.

Remove side-effects

June 30, 2019 · 13:43 · Viktor Szépe

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.

Viktor Szépe

A better title could be "Separate side-effects"