Skip to content

Requirements

github-actions[bot] edited this page Mar 4, 2026 · 11 revisions

PHP_CodeSniffer 4.x requires PHP 7.2.0 or greater.
Prior to PHP_CodeSniffer 4.0.0, the minimum PHP requirement was 5.4.0.

Additionally, PHP_CodeSniffer requires the following PHP extensions to be enabled:

  • Tokenizer: used by the core tokenizer to process PHP files
  • SimpleXML: used to process ruleset XML files
  • XMLWriter: used to create some report formats

The following PHP extension is not required, but is strongly recommended:

  • iconv: used for accurate character length calculation in files containing multibyte characters. Without this extension, some sniffs, like Generic.Files.LineLength, may report incorrect results for lines containing non-ASCII characters, as PHP_CodeSniffer will fall back to byte-based length calculations.

Individual sniffs may have additional requirements such as external applications and scripts. See the Configuration Options manual page for a list of these requirements.

Clone this wiki locally