markdown 静态PHP7分析与phan和

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 静态PHP7分析与phan和相关的知识,希望对你有一定的参考价值。

# Phan
Phan is a static analyzer for PHP. Phan prefers to avoid false-positives and attempts to prove incorrectness rather than correctness.
[github.com/phan/phan](https://github.com/phan/phan)

## Install via Composer
`composer require --dev phan/phan`

note: php-ast is necessary (`sudo apt install php-ast`)

### Help
`./vendor/bin/phan -h`

## Usage
`./vendor/bin/phan -b <path>/<file.php>`

```bash
cd <directory>
find . -name '*.php' | grep -v test > filelist.txt
./vendor/bin/phan -i -b -f filelist.txt
```

# 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.
[github.com/Alexia/php7mar](https://github.com/Alexia/php7mar)


## Install via Composer
`composer require --dev Alexia/php7mar`

### Help
`php ./vendor/alexia/php7mar/mar.php`

## Usage
`php ./vendor/alexia/php7mar/mar.php -f="<path>/<file.php>"`

以上是关于markdown 静态PHP7分析与phan和的主要内容,如果未能解决你的问题,请参考以下文章

php7静态变量与普通变量的区别

markdown 使用PHP7-FPM和XDebug设置Nginx的快速指南

PHP7到底有多快,基准测试与特性分析告诉你

markdown OSX上的php7.x

markdown macOS PHP7 Apache故障排除

markdown 如何使用EasyEngine安装php7.1-fpm