表達式(連接字符串)類的成員變量,我想通過連接字符串初始化使用expression-類成員無功...爲什麼是以下不可能......初始化與PHP
class aClass {
const COMPANY_NAME = "A Company";
var $COPYRIGHT_TEXT = "Copyright © 2011 " . COMPANY_NAME; // syntax error on this line - why?
var $COPYRIGHT_TEXT2 = "Copyright © 2011 " . "A Company"; // even a syntax error on this line
}
非常感謝您的幫助。
Prembo
謝謝。還要感謝其他PHP建議... – Prembo