You can't call functions while declaring class/object variables/constants. You also can't use string concatenation. Its pretty limited.
UPDATE:
You can use the following workaround (it took a little time to write), its a little ugly because it requires defining constants twice:
<?php
define('CONFIG_DIRECTORY_RESOURCES', realpath(__DIR__));
define('CONFIG_DIRECTORY_ROOT', $_SERVER['DOCUMENT_ROOT']);
define('CONFIG_DIRECTORY_BRANCH', $_SERVER['DOCUMENT_ROOT'] . '/branch');
define('CONFIG_DIRECTORY_TEMPLATES', CONFIG_DIRECTORY_RESOURCES . '/templates');
define('CONFIG_DIRECTORY_LIBRARY', CONFIG_DIRECTORY_RESOURCES . '/library');
define('CONFIG_DIRECTORY_VIEWS', CONFIG_DIRECTORY_RESOURCES . '/views');
define('CONFIG_DIRECTORY_CONTROLLERS', CONFIG_DIRECTORY_RESOURCES . '/controllers');
define('CONFIG_DIRECTORY_BACKUPS', CONFIG_DIRECTORY_RESOURCES . '/backups');
class Config
{
public static $directories = array(
"resources" => CONFIG_DIRECTORY_RESOURCES,
"root" => CONFIG_DIRECTORY_ROOT,
"branch" => CONFIG_DIRECTORY_BRANCH,
"templates" => CONFIG_DIRECTORY_TEMPLATES,
"library" => CONFIG_DIRECTORY_LIBRARY,
"views" => CONFIG_DIRECTORY_VIEWS,
"controllers" => CONFIG_DIRECTORY_CONTROLLERS,
"backups" => CONFIG_DIRECTORY_BACKUPS,
);
}