PHP_CodeSniffer is a PHP script that detects violations of coding standards in PHP, JavaScript, and CSS files. It works by tokenizing and "sniffing" the files. A coding standard is a collection of sniff files, with each sniff file checking a single part of the standard. PHP_CodeSniffer can be installed via PEAR or Composer. It has integrations for IDEs like PHPStorm, Eclipse, and NetBeans, as well as version control systems. Popular predefined coding standards include PSR1, PSR2, PEAR, and Zend. Custom standards can be defined using a ruleset.xml or StandardNameCodingStandard.php file with sniffs placed in a StandardName/