What is PHP 7 Migration Assistant Report(MAR)?

PHP 7 MAR, or just “php7mar”, is a command line utility to generate reports on existing PHP 5 code to assist developers in porting their code quickly to PHP 7. It will run against invididual files or entire project folders. Reports contain line numbers, issues noted, and suggested fixes along with documentation links.

git clone https://github.com/Alexia/php7mar.git
php mar.php -f="檔案"
php mar.php -f="目錄"

結果

Report located at: /root/php7mar/reports/2017-10-29 13.31.40 target.md

2017-10-29T13:31:09+00:00
Scanning /var/www/html/target
Including file extensions: php
ERROR! Syntax checking was selected and a PHP binary lower than 7.0.0-dev was specified.
Processed 65924 lines contained in 267 files.
Processing took 1.627012014389 seconds.

# critical
#### /var/www/html/target/config/database.php
* deprecatedFunctions
* Line 36: `| There is an incompatibility in PHP with mysql_real_escape_string() which`

 

 

Related posts 相關文章
WordPress 6.3 以後可能不支援 PHP 5,最低需求為 PHP 7.4
More...
你的 WordPress 升級到 PHP 8 了嗎
More...
PHP 8 已是 release 版本,然而還是有很多網站是 5 版
More...
哇,PHP 5.5.0 來了,如果你還在用4.x是不是太落後了
More...

作者

留言

撰寫回覆或留言

發佈留言必須填寫的電子郵件地址不會公開。