Screening Entry Level

Which PSR standards do you follow in PHP development? How do they improve interoperability and why do some matter more than others?

Quick Tip

Prioritise the practical ones: "PSR-4 for autoloading is non-negotiable. PSR-12 style enforced by PHP CS Fixer keeps code consistent. PSR-3 logging and PSR-6 caching let me swap implementations without changing business logic."

What good answers include

Key PSRs: PSR-4 (autoloading), PSR-12 (coding style, successor to PSR-2), PSR-7 (HTTP message interfaces), PSR-11 (container interface), PSR-6/PSR-16 (caching), PSR-3 (logging via Monolog), PSR-15 (HTTP middleware), and PSR-18 (HTTP client). PSR-4 and PSR-12 matter most for daily development — autoloading makes modern PHP work, and consistent style reduces code review friction. PSR-7 and PSR-15 matter for framework interoperability — middleware written against PSR-15 works in any compatible framework. Strong candidates explain: why PSR-7 objects are immutable, how PSR-11 enables framework-agnostic library code, and that coding standards enforcement should be automated (PHP CS Fixer, PHP_CodeSniffer) not manual.

What interviewers are looking for

Tests PHP ecosystem knowledge. Candidates who cannot name any PSRs may not be engaged with the broader PHP community. Those who understand which standards enable interoperability and automate style enforcement demonstrate professional practice.

← All PHP questions