Home  >  Article  >  Backend Development  >  PHP 静态分析器:phan

PHP 静态分析器:phan

WBOY
WBOYOriginal
2016-06-20 12:51:292129browse

phan 是 PHP 的静态分析器。它需要加载 PHP-AST 扩展的 PHP7 。当然,你可以用于分析任何版本的PHP写的代码。不过,phan 不适合生产使用。

特性:

  • 检查未声明的函数、方法、闭包和类的调用与实例。

  • 检查类型的所有从函数、闭包、方法发出/返回的参数、返回值的所有类型。

  • 支持@param,@return,@var和@deprecatedphpdoc 注释包括 union 和 void/null types

  • Checks for Uniform Variable Syntax PHP 5 -> PHP 7 BC breaks

  • 未定义的变量跟踪

  • 支持的命名空间,特征和variadics

  • 泛型 (from phpdoc hints - int[], string[], UserObject[], etc.)

  • 基本污染数据检测

项目主页:http://www.open-open.com/lib/view/home/1438525269655

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn