PHP coding standards
3 August 2025 (Updated 16 September 2025)
- PSR-1: Basic Coding Standard
- Establishes very basic conventions.
- PSR-2: Coding Style Guide
- The deprecated coding standard that’s now been replaced by PSR-12 (see below).
- PSR-12: Extended Coding Style
- The coding standard that extends replaces PSR-2. It requires adherence to PSR-1: Basic Coding Standard.
- PEAR Coding Standards
- Originated with the PEAR project but not widely used today.
- Symfony Coding Standards
- Follows PSR-12 but with additional conventions like using strict types.
Tagged:
PHP