Directly on the steps:
1cd/datas/htdocs/2 mkdirphpcompatibility3CD phpcompatibility/4Curl-s http://Getcomposer.org/installer | php5./composer.phar Require"squizlabs/php_codesniffer=2.*"6CD vendor/squizlabs/php_codesniffer/codesniffer/Standards7git clone https://Github.com/wimg/phpcompatibility.git8cd/datas/htdocs/phpcompatibility/9./vendor/bin/phpcs-ITen./vendor/bin/phpcs--standard=phpcompatibility--runtime-set testversion7.1/datas/htdocs/thinkphp/
The 10th line above is the thinkphp to do the test, the results are similar:
1FILE: ... s/htdocs/thinkphp/library/vendor/templatelite/class.compiler.php2----------------------------------------------------------------------3FOUND1ERROR and1WARNING affecting2LINES4----------------------------------------------------------------------5 159| ERROR | Preg_replace ()-/e modifier is deprecated since PHP6| |5.5and removed since PHP7.07----------------------------------------------------------------------
For more phpcompatibility related content, please refer to https://www.sitepoint.com/quick-intro-phpcompatibility-standard-for-phpcs-are-you-php7-ready/
Phpcompatibility Detecting PHP version Syntax compatibility