I use PHPClipse for my PHP development. It has some code highlighting and some other validation such as forgetting to put a ';' at the end of a statement or forgetting '}' etc. I find it is easy to make a mistakes, for example
class foo {
private $test;
function __construct() {
$test = new stdClass;
$test->myVar = "hello";
}
function getTest() {
echo $this->test->myVar;
}
}
This should have been $this->test = 6;
In code when things like this happen in conditionals such as if else
the only time you realise is when the else
statement executes which might be after the software was delivered to clients.
Other examples may be displaying a warning when a function from an abstract class is not implemented.
Is there a way, particularly in Eclipse, that you can turn on some sort of STRICT validate which highlights anything that might be a little dubious?