PHP_CodeSniffer
PHP_CodeSniffer: A focused, free PHP linter with custom rules, autofix, reporting, and CI support. Ranked #19 of 33 in Linters by our editors (7.3/10); pricing: Free plan; best for PHP teams enforcing coding standards.
At a glance
- Editor score7.3 / 10
- PricingFree plan
- Best forPHP teams enforcing coding standards
- Free planYes
- Paid fromFree
- CI supportYes
- Facts checked21 Sep 2026

Where it wins
- Built-in PSR-12 and support for external coding standards
- Custom XML rulesets and custom sniffs for team conventions
- Autofix, detailed reports, filtering, and CI support
Where it doesn't
- Focused on PHP file scanning in the current 4.x series
- No IDE support is supplied
- Autofix applies only to supported violations
Our verdict on PHP_CodeSniffer
PHP_CodeSniffer is an open-source command-line tool for PHP developers and teams enforcing coding standards. Its phpcs script tokenizes PHP files and reports violations against selected standards, while phpcbf automatically fixes supported violations. The current 4.x series focuses on PHP file scanning and requires PHP 7.2 or later, making the product a focused fit for PHP code-quality workflows rather than a multi-language linting suite.
The free open-source model keeps the product accessible for individual developers and teams. Its built-in PSR-12 standard provides a ready starting point, while support for external standards, custom XML rulesets, and custom sniffs allows teams to encode more specific conventions. Command-line filtering by sniff, severity, and exclusions helps narrow checks for particular workflows. The main limitation is that automatic correction is limited to violations supported by phpcbf, so teams may still need manual changes for other findings.
PHP_CodeSniffer fits teams that prefer scriptable tooling and need CI execution, selectable checks, and multiple report formats, including full, summary, JSON, XML, and JUnit reports. It can be installed as PHAR files, through Composer or Phive, or from source, giving PHP projects several installation paths. There is no IDE support supplied, so teams seeking editor-integrated feedback may prefer a linter with native IDE integration. Choose PHP_CodeSniffer for standards enforcement centered on PHP, custom rules, reporting, and CI; look elsewhere if multi-language scanning or built-in IDE support is essential.
Your product? Our editors can test PHP_CodeSniffer in depth and publish a review, labelled as paid · from $149/mo →
PHP_CodeSniffer pricing
PHP_CodeSniffer fact sheet
| Free plan | Yes |
|---|---|
| Paid from | Free |
| Languages supported | 1 |
| Autofix | Yes |
| Custom rules | Yes |
| Security rules | Not verified |
| IDE support | Not verified |
| CI support | Yes |
| Support | Community, Docs |
| Built for | Solo, Small business, Mid-market, Enterprise (editorial estimate) |
| Pricing | Free plan |
| Website | github.com |
| Facts checked | 21 Sep 2026 |
Alternatives to PHP_CodeSniffer
- ESLintA free, extensible JavaScript linter with autofix, plugins, and broad developer-tool integrations.9.4
- RuffFree Python linting and formatting with more than 900 built-in rules.9.2
- ShellCheckA free, open-source linter for shell syntax, portability, robustness and security checks.9.0
See all PHP_CodeSniffer alternatives →
Used PHP_CodeSniffer? Be the first to review it
The editor score above is our own research. What this page doesn't have yet is a reader's view — what you used PHP_CodeSniffer for, what worked and what didn't. No stars are seeded and no review is paid for; an editor reads every one before it appears.
Write a reviewTwo minutes · verified accounts only · read by an editor before it appears
Featured on iTechGuides
PHP_CodeSniffer is listed in our Linters directory. Add the badge to your site — it links back to this page.
<a href="https://www.itechguides.com/products/php-codesniffer/"><img src="https://www.itechguides.com/best/badge/php-codesniffer.svg" alt="Featured on iTechGuides" width="230" height="46"></a>
Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026
Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.
Last updated · How we research and update


