PHP static code analysis tool, which detects uncaught exceptions?

后端 未结 2 1835
一整个雨季
一整个雨季 2020-12-20 00:49

There seems to be quite a lot of static code analysis tools for PHP, could you please suggest the one, which can detect exceptions, which are thrown in the PHP code, but are

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-20 01:31

    PHPLint seems to be the answer. For example, it parses

    , which will never throw an exception (unless you're in the past), into:

    BEGIN parsing of test-cSdHoW
    1:      

    So that's exactly what I was asking for :) Adding a docblock and catching the exception results in no more errors or warnings from PHPLint.

提交回复
热议问题