PHP_CodeSniffer
The facts below are what the maker publishes about PHP_CodeSniffer, checked and dated. Our editors have not written about it yet.
Plans and prices
From PHP_CodeSniffer's own pricing page, checked 11 Oct 2001.
| Plan | Price | What it gives you |
|---|---|---|
| PHP_CodeSniffer | Free | BSD-3-Clause license · requires PHP 7.2.0 or greater |
The facts
Each one read from PHP_CodeSniffer's own pages, with the date it was checked.
What it does
- Automatic fixes
- It includes phpcbf, a script that automatically corrects coding standard violations.checked 11 Oct 2001
- Built-in standards
- The included standards include PEAR, PSR1, PSR2, PSR12, Squiz, and Zend.checked 11 Oct 2001
- CI usage
- The project documentation suggests configuring project settings when using PHP_CodeSniffer on a team or CI server.checked 11 Oct 2001
- Custom standards
- Users can install external coding standards and configure checks with ruleset files.checked 11 Oct 2001
- Download verification
- The project says its PHAR files are signed with its official release key and that release PHAR provenance can be verified through GitHub Artifact Attestations.checked 11 Oct 2001
- File scope
- It checks specified files or directories and can recursively scan a directory's subfolders.checked 11 Oct 2001
- Installation
- The project documents installation through PHAR downloads, Composer, Phive, or a Git clone.checked 11 Oct 2001
- License
- The repository identifies PHP_CodeSniffer as BSD-3-Clause licensed.checked 11 Oct 2001
- Parallel scans
- The command supports parallel processing, which requires PHP's PCNTL extension and is disabled by default.checked 11 Oct 2001
- Purpose
- PHP_CodeSniffer tokenizes PHP files and detects violations of a defined coding standard.checked 11 Oct 2001
- Reports
- Available report formats include full, XML, Checkstyle, CSV, JSON, JUnit, Emacs, source, summary, diff, and performance.checked 11 Oct 2001
- Runtime requirement
- PHP_CodeSniffer requires PHP version 7.2.0 or greater, and individual sniffs may have additional requirements.checked 11 Oct 2001
- Support
- The project directs users to its GitHub issue tracker for bug reports and feature requests and to its wiki for documentation.checked 11 Oct 2001
Alternatives to PHP_CodeSniffer
- 1
Flake8
Free planOpen sourceAPILinuxmacOSSelf-hosted7.3Free plan - 2
PMD
Free planLinuxmacOSSelf-hostedWindows6.8Free plan - 3
SwiftLint
Free planLinuxmacOSWindows6.6Free plan - 4

Ruff
Free planWebLinuxmacOSSelf-hosted6.5Free plan - 5

Biome
Free planWebExtensionLinuxmacOS6.4Free plan - 6

Cppcheck
Free planLinuxmacOSSelf-hostedWindows6.4Free plan
