PHPCompatibility检测php版本语法兼容
2017-05-23 17:11
417 查看
直接上步骤:
上面第10行是那thinkphp做测试,结果类似:
更多PHPCompatibility相关内容,请参考 https://www.sitepoint.com/quick-intro-phpcompatibility-standard-for-phpcs-are-you-php7-ready/
---------------------2017-07-18-----------------------
提供一个压缩包,直接解压可用 https://pan.baidu.com/s/1c1JX5DY
1 cd /datas/htdocs/ 2 mkdir PHPCompatibility 3 cd PHPCompatibility/ 4 curl -s http://getcomposer.org/installer | php 5 ./composer.phar require "squizlabs/php_codesniffer=2.*" 6 cd vendor/squizlabs/php_codesniffer/CodeSniffer/Standards 7 git clone https://github.com/wimg/PHPCompatibility.git 8 cd /datas/htdocs/PHPCompatibility/ 9 ./vendor/bin/phpcs -i 10 ./vendor/bin/phpcs --standard=PHPCompatibility --runtime-set testVersion 7.1 /datas/htdocs/thinkphp/
上面第10行是那thinkphp做测试,结果类似:
1 FILE: ...s/htdocs/thinkphp/Library/Vendor/TemplateLite/class.compiler.php 2 ---------------------------------------------------------------------- 3 FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES 4 ---------------------------------------------------------------------- 5 159 | ERROR | preg_replace() - /e modifier is deprecated since PHP 6 | | 5.5 and removed since PHP 7.0 7 ----------------------------------------------------------------------
更多PHPCompatibility相关内容,请参考 https://www.sitepoint.com/quick-intro-phpcompatibility-standard-for-phpcs-are-you-php7-ready/
---------------------2017-07-18-----------------------
提供一个压缩包,直接解压可用 https://pan.baidu.com/s/1c1JX5DY
相关文章推荐
- LAMP开发精要(1):让 PHP 类的构造函数兼容 4.0 和 5.0 版本
- AngularJs学习笔记--IE Compatibility 兼容老版本IE
- iOS开发之版本兼容一,使用#ifdef语法
- php面向对象(OOP)—不同php版本构造方法的继承和兼容
- php语法检测,sublime linter-php
- php正则语法,与perl 兼容
- 安装ecshop2.7时候的错误处理 php版本不兼容引起
- 自己写的兼容低于PHP 5.5版本的array_column()函数
- 自己写的兼容低于PHP 5.5版本的array_column()函数
- php 5.6 与之前版本不兼容中的数组属性定义辨析
- 未在系统中检测到兼容的 Visual Studio 2008 版本。
- EditPlus 中user tool 操作远程文件技巧-php语法检测
- 判断浏览器及版本demo(IE11及以下,firefox,chrome,safari,opera) 分类: 浏览器兼容 浏览器检测 2014-01-27 17:12 1337人阅读 评论(0) 收藏
- 写了一个PHP版本的MONGODB语法解析器,可以通过类似SQL的语法来进行MONGODB的查询,不知道有人需要不,分享一下吧
- DedeCMS 5.7不兼容PHP 5.4版本的解决办法
- 开始学习PHP,新写一段小代码检测IE版本,求指导
- js检测浏览器版本代码,兼容ie11
- php检测useragent版本示例
- AngularJs学习笔记--IE Compatibility 兼容老版本IE
- 加速器eaccelerator不兼容高版本php