Coding standards

PHP_CodeSniffer

PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.

When to use it

Teams enforcing published PHP standards or detailed project-specific coding rules

Its extensible sniff API supports mature community standards and precise custom rules.

Installation and compatibility

Type
Analyzer
PHP
>=7.2.0
License
BSD-3-Clause
Install
composer require --dev phpcsstandards/php_codesniffer

Check the project documentation for configuration and version-specific requirements.

Strengths and limitations

ProSupports established standards and detailed custom sniffs.

ConLarge standards need configuration and can produce many findings.

Editorially reviewed

Repository activity

Activity: Active. Repository activity is a separate signal from suitability for your application.

Latest release
4.0.4
Last commit
Last release

Metadata checked: .

Explore related tools

Browse all coding standards. Tools in the same category can serve different workflows; compare their requirements and limitations.

Selection guides