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

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

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

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

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