views:

22

answers:

2

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 are 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?

A: 
php -l /path/to/file

That's as good as it gets.

Setup xdebug for debugging, better error messages, etc.

Trent Davies
xdebug is after you run your code.. I need something before even clciking the run button!
A: 

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

Sarfraz
ah I am not looking for those.. remember if you code in java/c you get a error reported that the functiin name is incorrect, or teh variables name doesn't exists. something like that