PSR-1 Basic Coding Standard
suggest changePSR-1 is an accepted recommendation and outlines a basic standard recommendation for how code should be written.
- It outlines naming conventions for classes, methods and constants.
- Namespaced code must follow PSR-0 or PSR-4 autoloading. PSR-0 is deprecated.
- It indicates which PHP tags to use:
<?phpand<?=, not<?. - Files must be UTF-8 without a BOM.
- A file must either declare new symbols (classes, functions, constants, and so on) and cause no other side effects, or execute logic with side effects and not define symbols. It must not do both.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents