I have seen the below question and was wondering if there is something like it for Eclipse .
Also, how can I make sure that this kind of errors gets thrown into my trigger error function, so that I can write it to a log.
Not sure it can report unused variables, but PHP_CodeSniffe r is nice when it comes to detecting problems in PHP source code.
Still, it's a command-line tool, and it's not integrated in Eclipse PDT...
As a sidenote :
The post you are linking to is talking about the second kind, and not the first one.
To get undeclared/uninitialized variables reported by the PHP engine :
error_reporting
, and configure it so it report E_NOTICE
display_errors
log_errors
But, here too, this is not integrated in Eclipse -- and I've never seen a tool that would parse the PHP error log, and push the notices to Eclipse...
Have you tried PMD Eclipse yet? According to my colleagues it is a pretty handy tool.
Netbeans IDE(我上个月从eclipse pdt换了)识别并显示有关未使用和未初始化的方法,变量等的警告。
You may be interessed in http://qualityassuranceinphpprojects.com/pages/tools.html that deals with testing/QA/CI/... and many other topics. PMD, PHP_CodeSniffer that have already been mentioned are as well in there as are many others
Install 'PDT Extensions' from here http://p2.pdt-extensions.org/
From the Eclipse(PDT) main menu select Help\\Install New Software
Then enter the above URL in the 'Work with' edit box. Click 'Add'. Check the 'PDT Extensions' checkbox. Click 'Next'...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.