This is a set of sniffs for PHP_CodeSniffer that checks for PHP version compatibility.
- Install PHP_CodeSniffer with
pear install PHP_CodeSniffer
(PHP_CodeSniffer 1.3 or later is required). If pear installs PHP_CodeSniffer 1.2.x, usepear install PHP_CodeSniffer-alpha
- Checkout this repository as
PHPCompatibility
into thePHP/CodeSniffer/Standards
directory. - Use the coding standard with
phpcs --standard=PHPCompatibility
.
More information can be found on Wim Godden's blog.
This code is released under the GNU Lesser General Public License (LGPL). For more information, visit http://www.gnu.org/copyleft/lesser.html