abstract class First {
function init() {
echo static::DIR;
}
}
class Second extends First {
const DIR = 'test';
}
Second::init(); // "test"
class Third {
function test() {
Second::init(); // "test"
}
}
$third = new Third();
$third->test();
Source: https://habr.com/ru/post/98496/