Well, this is a stupid question, but I can’t think about why he was stupid.
In php, when you define a class level constant, like in:
const MY_CONSTANT = 'hello constant';
why can't you initialize this value with a function like
const MY_FILEPATH = dirname(dirname(__FILE__)) . '/heres-my-file.php';
source
share