Documentation

PHP-FIG and PSR Standards Explained

Learn how PHP-FIG recommendations improve interoperability through shared coding, autoloading and interface standards.

Overview

PHP-FIG, the PHP Framework Interop Group, coordinates recommendations intended to improve interoperability across PHP projects and libraries. Its PHP Standards Recommendations are commonly known as PSRs.

Why standards matter

Shared conventions make it easier for developers to understand code from different projects. Standards cover areas such as basic coding style, autoloading, logging, HTTP messages, containers and caching interfaces.

How to use PSRs

Read the status of a recommendation before treating it as a stable standard. Accepted recommendations can guide new code and library integrations; draft proposals may still change. A project does not need to adopt every interface, but consistent conventions reduce integration friction.

Practical starting points

PSR-4 describes autoloading conventions, PSR-3 defines a logger interface and PSR-12 provides an extended coding style guide. Check the individual specification for exact requirements.

Official resources

PHP-FIG: https://www.php-fig.org/ PSR index: https://www.php-fig.org/psr/

Additional notes consolidated from the previous entry

Overview

PHP-FIG publishes PHP Standards Recommendations that improve interoperability across libraries and applications.

Useful standards

  • PSR-4: Autoloading
  • PSR-12: Extended Coding Style
  • PSR-3: Logger Interface
  • PSR-7: HTTP Message Interfaces
  • PSR-11: Container Interface

Check each recommendation's current status and specification on the official site.

Official website: PHP-FIG

Evaluation checklist

  • Prefer official documentation and repositories.
  • Check supported PHP versions and release history.
  • Review installation instructions and license terms.
  • Keep dependencies updated and run security checks.
Share this page Help other developers discover this resource.