What are PSR standards (e.g., PSR-4, PSR-12), and why are they critical for the PHP ecosystem?

Last updated 15 June 2026

  • PSR standards are PHP-FIG recommendations: PSR-4 underpins Composer autoloading and PSR-12 defines a common code style.

  • Interface PSRs (PSR-3 logger, PSR-7 HTTP, PSR-11 container) define swappable contracts, so code works with any compliant implementation.

  • Composer and frameworks like Laravel and Symfony assume them, so packages plug in easily and vendor lock-in is reduced.

  • https://www.php-fig.org/psr/
  • https://jonesrussell.github.io/blog/psr-standards-in-php-practical-guide-for-developers/
  • https://www.youtube.com/watch?v=rqzYdHdyMH0
  • https://www.specbee.com/blogs/introduction-php-standard-recommendation-psr
  • https://www.php-fig.org/psr/psr-12/
  • https://www.php-fig.org/psr/psr-12/meta/
  • https://medium.com/@rupeshm173/understanding-php-coding-standards-a-guide-to-psr-12-7ae3cb4e8c5c
  • https://hyring.com/jobseeker-toolkit/interview-questions/technical/php
All PHP interview questions