You cannot have expressions in variable declarations. You can use only constant values. dirname() may not appear in this position.
If you used PHP 5.3, you can use:
public $currentDir = __DIR__ ;
Otherwise, you will need to initialize $this->currentDir to __construct or.
mario source share