日期:2014-05-17  浏览次数:20464 次

一个测试过往PHP版本在新的PHP 5.3下是否兼容的工具
在PHP 5.3中,其实的确多了很多新的特性,但有时以前写了很多PHP 4,PHP 5,PHP5.1,
PHP 5.2的项目的话,在向PHP 5.3过渡时,有的时候会出现很多错误,
于是老外写了个工具可以检查其兼容性,地址在
http://github.com/wimg/PHP53Compat_CodeSniffer/downloads
可以下载,使用方法简单:
phpcs --standard=PHP53Compatibility <path-to-your-PHP-source-directory>

即可输出
更多的参考:
http://techblog.wimgodden.be/2010/06/24/automated-php-5-3-compatibility-testing-for-your-old-code/