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.
This file has been truncated.
# Basic Coding Standard
This section of the standard comprises what should be considered the standard
coding elements that are required to ensure a high level of technical
interoperability between shared PHP code.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD",
"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
interpreted as described in [RFC 2119].
[RFC 2119]: http://www.ietf.org/rfc/rfc2119.txt
## 1. Overview
- Files MUST use only `<?php` and `<?=` tags.
- Files MUST use only UTF-8 without BOM for PHP code.
We have class files and files full of functions
with side-effects It would be the first step towards class autoloading.
Read-only archive: https://petitions.classicpress.net/posts/182/remove-side-effects
Author: Viktor Szépe
Vote count: 5
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.
This topic was automatically closed after 3 days. New replies are no longer allowed.