I am aware of all the great debug engines out there like Zend or xdebug, but I just want a simple error_log("Something"); debug mode.
I have a class like this:
class myClass {
$DEBUG_MODE = True;
public function someFunction(){
if($DEBUG_MODE)
{
error_log($varName); // outputs to my Apache server's error log file.
}
}
}
However, I get the below error:
Undefined variable: DEBUG_MODE in path in line: integer
I am probably mixing up my Java and PHP... Could someone give me some insight or perhaps a better way to debug?