What are PSR standards, and why are they important for the PHP ecosystem?
Last updated
PSRs (PHP Standards Recommendations) are PHP-FIG specifications covering autoloading (
PSR-4), coding style (PSR-12) and shared interfaces likePSR-3logging andPSR-7HTTP messages.They enable interoperability (swap compliant implementations without rewriting code) and consistency across projects, and Composer and frameworks rely on them.
They are recommendations, not enforced rules, but adopting them is the de facto professional standard.