PHP Sniffer installs statistics
By wongjn · VS Code Marketplace · Linters
Uses PHP_CodeSniffer to format and lint PHP code.
PHP Sniffer has 238,582 recorded installs on VS Code Marketplace, an increase of 0.4% over the past 30 days, ranking #1355 of 2,515 tracked listings.
Rating: 4.87 / 5 from 15 ratings
About PHP Sniffer
PHP Sniffer
Uses PHP_CodeSniffer to format and lint (mainly) PHP code.
Features
- Runs
phpcsto lint code. - Runs
phpcbfto format fixable code validation errors, using the built-in commands "Format Document" or "Format Selection" (PHP only).- One may need to set this extension as the default language formatter for
some languages. The following snippet is an example for PHP that can be
added in a
settings.json:{ "[php]": { "editor.defaultFormatter": "wongjn.php-sniffer" } }
- One may need to set this extension as the default language formatter for
some languages. The following snippet is an example for PHP that can be
added in a
Requirements
Extension Settings
Quick Setup
settings.json:
{
"phpSniffer.autoDetect": true
}
And if your projects look like this:
workspace-folder/
vendor/
bin/
phpcs
phpcbf
.phpcs.xml
Validation and formatting will work (see below for alternative filenames for
.phpcs.xml).
In Depth
This extension contributes the following settings:
phpSniffer.run: When to runphpcs(the linter). Can beonSave,onTypeornever.phpSniffer.onTypeDelay: WhenphpSniffer.runisonType, this sets the amount of milliseconds the validator will wait after typing has stopped before it will run. The validator will also cancel an older run if the run is on the same file.phpSniffer.extraFiles: Glob patterns of extra files to match that this extension should run on. Useful for standards that don't just validate PHP files. This extension will always run on PHP files — be sure to have yourfiles.associationssetting correctly setup for PHP files.phpSniffer.executablesFolder: The folder where bothphpcsandphpcbfexecutables are. Use this to specify a different executable if it is not in your globalPATH, such as when usingPHP_Codesnifferas a project-scoped dependency. Can be absolute, or relative to the workspace folder.phpSniffer.autoDetect: Set totruefor the extension to auto-detectphpSniffer.executablesFolderas./vendor/bin/per workspace folder (applies only ifphpSniffer.executablesFolderis empty).phpSniffer.standard: The standards to check against. This is passed to thephpcbfandphpcsexecutables as the value for--standard. Can be absolute, or relative to the workspace folder. If not set, PHP_CodeSniffer will attempt to find a file to use, at the root of the currently open file's workspace folder in the following order:.phpcs.xmlphpcs.xml.phpcs.xml.distphpcs.xml.dist
phpSniffer.snippetExcludeSniffs: Sniffs to exclude when formatting a PHP code snippet (such as when formatting on paste or on the commandformat on selection). This is passed to thephpcbfcommand as the value for--excludewhen not formatting a whole file.phpSniffer.disableWhenDebugging: Disable sniffing when any debug session is active.
Known Issues
Windows Hanging PHP Process
When phpcs encounters a malformed array declaration, it can sometimes hang from an error.
This is exacerbated by the fact that we do not have access to the spawned php
process in the extension code and cannot kill php.exe directly. This causes
many non-exiting PHP processes on Windows machines which can really slow down
the machine.
The fix for this is to update squizlabs/PHP_Codesniffer in use to >=3.4.2.
Description from the VS Code Marketplace listing.
- linters
- php
- phpcbf
- phpcs
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Ratings over time
Listing placement
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Installs on a linear scale. Placement is projected from installs, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (50)Similar VS Code Marketplace Linters plugins
All 20 PHP Sniffer alternativesData source
Install counts, average rating, and rating counts come from the public Visual Studio Marketplace gallery API. Installs are cumulative and exclude updates.
Listing: https://marketplace.visualstudio.com/items?itemName=wongjn.php-sniffer. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.