There is a certain conditional function:
function environment() { return 'developer'; } And there is a certain conditional class in which the variable is declared:
сlass SomeClass { private $filename = "/var/www/" . environment() . "/engine/debugger.log"; } But for some reason, when executing the code, an error occurs:
Constant expression contains invalid operations
Why can't I call a global function in the class body and how can I achieve the desired result?