PHP Standard Recommendation


The PHP Standard Recommendation is a PHP specification published by the PHP Framework Interop Group. Similar to Java Specification Request for Java, it serves the standardization of programming concepts in PHP. The aim is to enable interoperability of components and to provide a common technical basis for implementation of proven concepts for optimal programming and testing practices. The PHP-FIG is formed by several PHP frameworks founders.
Each PSR is suggested by members and voted according to an established protocol to act consistently and in line with their agreed upon processes.
NumberNameDescriptionEditorCoordinatorSponsorStatus
PSR-0Autoloading StandardIt describes the mandatory requirements that must be adhered to for autoloader interoperability.N/AN/AN/ADeprecated and substituted by PSR-4
PSR-1Basic Coding StandardIt comprises what should be considered the standard coding elements that are required to ensure a high level of technical interoperability between shared PHP code.N/AN/AN/AAccepted
PSR-2Coding Style GuideIt considers PSR-1 and it is intended to reduce cognitive friction when scanning code from different authors. It does so by enumerating a shared set of rules and expectations about how to format PHP code.N/AN/AN/ADeprecated
PSR-3Logger InterfaceIt describes a common interface for logging libraries.Jordi BoggianoN/AN/AAccepted
PSR-4Autoloading StandardIt describes a specification for autoloading classes from file paths. It is fully interoperable, and can be used in addition to any other autoloading specification, including PSR-0. This PSR also describes where to place files that will be auto loaded according to the specification.Paul M. JonesPhil SturgeonLarry GarfieldAccepted
PSR-5PHPDoc StandardThe main purpose of this PSR is to provide a complete and formal definition of the PHPDoc standard. This PSR deviates from its predecessor, the de facto PHPDoc Standard associated with phpDocumentor 1.x, to provide support for newer features in the PHP language and to address some of the shortcomings of its predecessor.Mike van RielPhil SturgeonDonald GilbertDraft
PSR-6Caching InterfaceThe goal of this PSR is to allow developers to create cache-aware libraries that can be integrated into existing frameworks and systems without the need for custom development.Larry GarfieldPaul DragoonisRobert HafnerAccepted
PSR-7HTTP Message InterfaceIt describes common interfaces for representing HTTP messages as described in RFC 7230 and RFC 7231, and URIs for use with HTTP messages as described in RFC 3986.Matthew Weier O'PhinneyBeau SimensenPaul M. JonesAccepted
PSR-8Huggable InterfaceIt establishes a common way for objects to express mutual appreciation and support by hugging. This allows objects to support each other in a constructive fashion, furthering cooperation between different PHP projects.Larry GarfieldCal EvansPaul M. JonesAbandoned
PSR-9Security DisclosureIt gives project leads a clearly defined approach to enabling end users to discover security disclosures using a clearly defined structured format for these disclosures.Lukas Kahwe SmithKorvin SzantoLarry GarfieldAbandoned
PSR-10Security AdvisoriesIt gives researchers, project leads, upstream project leads and end users a defined and structured process for disclosing security vulnerabilities.Lukas Kahwe SmithLarry GarfieldKorvin SzantoAbandoned
PSR-11Container InterfaceIt describes a common interface for dependency injection containers. The goal is to standardize how frameworks and libraries make use of a container to obtain objects and parameters.Matthieu Napoli, David NégrierPaul M. JonesJeremy LindblomAccepted
PSR-12Extended Coding Style GuideIt extends, expands and replaces PSR-2, the coding style guide and requires adherence to PSR-1, the basic coding standard.Michael CullumKorvin SzantoAlexander MakarovAccepted
PSR-13Hypermedia LinksIt describes common interfaces for representing a hypermedia link.Larry GarfieldMatthew Weier O’PhinneyMarc AlexanderAccepted
PSR-14Event ManagerIt describes common interfaces for dispatching and handling events.Larry GarfieldAccepted
PSR-15HTTP Server Request HandlersIt describes common interfaces for HTTP server request handlers and HTTP server middleware components that use HTTP messages.Woody GilkMatthew Weier O’PhinneyAccepted
PSR-16Simple CacheIt describes a simple yet extensible interface for a cache item and a cache driver.Paul DragoonisJordi BoggianoFabien PotencierAccepted
PSR-17HTTP FactoriesIt describes a common standard for factories that create PSR-7 compliant HTTP objects.Woody GilkMatthew Weier O’PhinneyAccepted
PSR-18HTTP ClientIt describes a common interface for sending HTTP requests and receiving HTTP responses.Tobias NyholmSara GolemonAccepted
PSR-19PHPDoc tagsIt provides a complete catalog of tags in the PHPDoc standard.Chuck BurgessDraft

The PHP-FIG official website has the PSR documentation that follows the RFC 2119 written by Scott Bradner in March 1997 at Harvard University.