Compile time error plugins for Php
I know that php is a scripting language like perl.python.
But, is there a eclipse plugin which gives a error when a function taht is called doesn't exists. Or when a variable which is defined in the doesn't exists.
There a开发者_JS百科re too many careless mistakes that are happening with me in a huge project. I miss java for this.
Any compile time error plugins for Php?
php -l /path/to/file
That's as good as it gets.
Setup xdebug for debugging, better error messages, etc.
I think you can use the XDebug for tracking down the errors and more.
But, is there a eclipse plugin which gives a error when a function taht is called doesn't exists.
Other than Xdebug, you can also check whether a function exists or not or if variable is defined or not using:
print function_exists('function_name');
print isset($variable_here); // for variable
print is_defind(CONSTANT_HERE); // for constant
I would also suggest you to go through very good tutorial at IBM:
Debugging Techniques For PHP Programmers
精彩评论