Skip to content

Web and technology

PSR

Abbreviation for PHP Standard Recommendation

In short and in plain language

PSR is a shared rule for programs written in PHP.

Each rule has a number.

PSR-3, for example, says how programs write messages to a log.

Definition
PSR stands for PHP Standard Recommendation, a numbered recommendation of the PHP Framework Interop Group (PHP-FIG) for shared interfaces and conventions in PHP. PSR-3, for example, describes a common logger interface with eight log levels from debug to emergency, so that frameworks and libraries use the same levels.