This will throw an error:
class foo
{
var $bar;
public function getBar()
{
return $this->Bar; // beware of capital 'B': "Fatal: unknown property".
}
}
But this won't:
class foo
{
var $bar;
public function setBar($val)
{
$this->Bar = $val; // beware of capital 'B': silently defines a new prop "Bar"
}
}
How can I force PHP to throw errors in BOTH cases? I consider the second case more critical than the first (as it took me 2 hours to search for a d....ned typo in a property).