You cannot have an expression in a class declaration.
I would suggest passing the path to:
public function __construct($path) { $this->debug_path = $path; }
This gives you more flexibility, if you ever want to change the path, you do not need to change the constant, just what you go through.
Or you can create several objects, all of which have different paths. This is useful if it is an autoloader class, as you might want to load multiple directories.
$autoloader = new Autoload(dirname(SYS_PATH)); $autoloader->register_loader(); class Autoload { public $include_path = ""; public function __construct($include_path="") {
source share