I tried many ways to define a constant based on another. Nothing comes out. Google and manuals didn’t help much either.
class Config { const PROJ_ROOT = "/srv/www/htdocs/inet_shop/admin"; const IMAGES_DIR = self::PROJ_ROOT . "/images"; // тут ошибка // ... } I run tests through the console and issue:
PHP Parse error: syntax error, unexpected '.', expecting ',' or ';' in /srv/www/htdocs/inet_shop/admin/config.php on line 5 Why?