Automatic checking of PHP code


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
3 views
Dear abrowser,

Recently I wanted to make automatic checking of PHP code before deployment to the server (not Unit tests). That is, hotels to have a tool that would say that the code might be an error. Unfortunately, I only know php -f (performance script) and the php -l (check for syntax errors). Perhaps, there are some 3rd party tools for analysis. Googling permission problems are not given, unfortunately (mostly offered plug-ins for well-known IDE, but I would like Tulsa, zapuskaem from the command line).

apt-cache search php | grep analy
also says nothing good :)

If you know such tools please share with us.
by | 3 views

5 Answers

0 like 0 dislike
https://github.com/sebastianbergmann/php-hudson-template collect all tools in one place with integration into CI server hudson. PHPunit can be disabled.
by
0 like 0 dislike
by
0 like 0 dislike
Tested for what?
by
0 like 0 dislike
I had heard about phplint and while searching him found a link yet here it is: stackoverflow.com/questions/378959/is-there-a-static-code-analyzer-like-lint-for-php-files.
by
0 like 0 dislike
Here is a good example, without using the parse PHP file for errors without executing it
by
110,608 questions
257,186 answers
0 comments
28,043 users