PHP 7.0 7.1 7.2 7.3 兼容性检测

栏目: PHP · 发布时间: 6年前

内容简介:检测PHP程序是否兼容 7.0 7.1 7.2 7.3利用 https://github.com/PHPCompatibility/PHPCompatibility地址:https://github.com/squizlabs/PHP_CodeSniffer/releases/download/3.4.2/phpcs.phar

检测 PHP 程序是否兼容 7.0 7.1 7.2 7.3

方法:

利用 https://github.com/PHPCompatibility/PHPCompatibility

步骤:

1.下载 phpcs

地址:https://github.com/squizlabs/PHP_CodeSniffer/releases/download/3.4.2/phpcs.phar

复制到 /usr/bin/phpcs

2.下载 PHPCompatibility源码:

https://github.com/PHPCompatibility/PHPCompatibility/archive/9.1.1.zip

解压到一个目录如/var/www/html/PHPCompatibility

/var/www/html/PHPCompatibility/下有README.md等文件 。

3.在终端执行:

phpcs --config-set installed_paths /var/www/html/PHPCompatibility

4.运行phpcs -i:

如果有PHPCompatibility说明生效。

5.在要检测的PHP项目目录运行

phpcs -p . --standard=PHPCompatibility

进行兼容性检测。

参考 https://github.com/PHPCompatibility/PHPCompatibility


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Numerical Recipes 3rd Edition

Numerical Recipes 3rd Edition

William H. Press、Saul A. Teukolsky、William T. Vetterling、Brian P. Flannery / Cambridge University Press / 2007-9-6 / GBP 64.99

Do you want easy access to the latest methods in scientific computing? This greatly expanded third edition of Numerical Recipes has it, with wider coverage than ever before, many new, expanded and upd......一起来看看 《Numerical Recipes 3rd Edition》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

随机密码生成器
随机密码生成器

多种字符组合密码

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具