• 请不要在回答技术问题时复制粘贴 AI 生成的内容
no13bus
V2EX  ›  程序员

php 里面有类似 RubyCritic 的这种代码审计工具吗?大家 php 代码分析工具都用啥呀

  •  
  •   no13bus ·
    no13bus · Aug 20, 2016 · 3406 views
    This topic created in 3561 days ago, the information mentioned may be changed or developed.
    5 replies    2016-08-21 17:58:17 +08:00
    RIcter
        1
    RIcter  
       Aug 20, 2016
    at 一下中国代码审计第一人 @phithon
    chineselittleboy
        2
    chineselittleboy  
       Aug 20, 2016
    占个位
    phithon
        3
    phithon  
       Aug 20, 2016   ❤️ 2
    php 开发方式并没有 ruby 那么统一,所以没有那么好用的工具。代码质量审核的工具倒是有, phpcs 这种。不过代码静态分析的项目( https://github.com/nikic/PHP-Parser )倒是有,直接分析到语法结构,不知道有没有人根据这个开发一个类似的工具。
    另外,代码审计全靠眼(颜)!
    no13bus
        4
    no13bus  
    OP
       Aug 21, 2016
    @phithon 多谢
    主要是有的时候, 你不小心少写了一个=号, 比如:

    if($aa=1){
    print '11';
    }

    这种有的时候用 phpcs 是检测不出来的.
    muziyue
        5
    muziyue  
       Aug 21, 2016
    @no13bus 你这个属于逻辑错误,代码审计并没有用呀
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1087 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 49ms · UTC 18:18 · PVG 02:18 · LAX 11:18 · JFK 14:18
    ♥ Do have faith in what you're doing.