string concatenation with constants
问题 I have only PHP 5.4 available at my current hoster and I always get errors with class constants in my code. Apparently, it's not allowed to define array constants. I changed the constant to a static variable to make it work. Now I get this syntax error: syntax error, unexpected '.', expecting ']' I try to define strings that consist of concatenated constants. public static $arr = [KEY_ONE => "string " . MyClass::CONSTANT . " string"] is this possible or do all constants have to be static