Coding Standards
Table of Contents
- Indenting and Line Length
- Control Structures
- Function Calls
- Class Definitions
- Function Definitions
- Arrays
- Comments
- Including Code
- PHP Code Tags
- Header Comment Blocks
- Using SVN
- Example URLs
- Naming Conventions
- File Formats
- E_STRICT-compatible code
- Error Handling Guidelines
- Best practices
- Sample File (including Docblock Comment standards)
- The PEAR toolbox
The PEAR Coding Standards apply to code that is part of the official PEAR distribution. Coding standards often abbreviated as CS among developers and they aim to keep code consistent to be easily readable and maintainable by most of PEAR folks.
The original coding standards have been adjusted several times through RFCs:
Those RFCs have been integrated into this document.
The PEAR2 Coding Standards define several other rules that have to be followed once PEAR2 is in place.